Building a REST API

Navigate to the repo location in terminal:

cd AutomationDatatools/distillery/

Start the server

DEBUG=distillery ./bin/www

Go to your web browser and navigate to the localhost

http://localhost:3000/api/imsreports

The structure looks like this for public, routes and views:

|– public
|   `– stylesheets
|       `– style.css
|– routes
|   |– api
|   |   |– imsreports.js
|   |   `– index.js
|   `– index.js
`– views
|– api
|   `– index.ejs
|– error.ejs
|– index.ejs
`– main.ejs

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s