Skip to content

amilam/rest-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest-service

A barebones Node.js app using Express 4.

Running Locally

Make sure you have Node.js and the Heroku CLI installed.

$ git clone https://github.com/amilam/rest-service.git
$ cd rest-service
$ npm install express express-basic-auth
$ node index.js

Your app should now be running on localhost:5000. This is secured with following credentials. username: admin password: admin

If you try http://localhost:5000/hello?name=john you will not see anything in the browser because it is unauthorized. But, if you try with the following curl command you will get a response. curl -v -X GET -H "Authorization:Basic YWRtaW46YWRtaW4=" 'http://localhost:5000/hello?name=amila'

Deploying to Heroku

$ heroku create
$ git push heroku master
$ heroku open

or

Deploy to Heroku

Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

About

A simple hello service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors