This RESTful service is built on Node.js, and it has the following components: a UI, a server, and a MySQL database.
To deploy this locally, download Node.js here: http://nodejs.org/download/. Clone this repository, go to the nodeService directory, and run in the command line:
node app.js
To view, open a browser and go to localhost:3000
.
If at any point the current RDS instance gets taken down, edit app.js
lines 17-20 for information about the new database.
Get All Records
Gets all records that are in the database and returns them.
Get Record
Gets a specific record specified the record ID.
Put Record
Stores a record with the specified record ID and name for later access.
Update Record
Updates a record already saved with the specified record ID and the new name for the record ID.
Delete Record
Deletes a record with the specified record ID. :w
app.js
: Server side: database connections and calls; configuration for rendering files, choosing ports, and so on/views/layout.jade
: UI implementation and calling of the APIs using Javascript/public/stylesheets/style.css
: CSS stylesheet for the UIpackage.json
: Metadata relevant to project; gives information to npm for project identification and dependency handling