[SOLVED] CAS CS591 PS3

$25

File Name: CAS_CS591_PS3.zip
File Size: 122.46 KB

5/5 - (1 vote)

CAS CS591 PS3
You have enough tools now to create a simple back-end server. In this assignment youll do just that, and post your project to your GitHub repo. We havent gone over all of the moving parts in class yet, so youll need to do a little research on your own. If you get stuck, post a note on Piazza.

Requirements

Create a new branch, PS3. Be sure that your .gitignore file has an entry to exclude /node_modules from being pushed to githuib.
Build a Node/Express application. The app must have:
An instance of express.Router in a separate route file that is mounted on the path /ps3 (i.e. app.use(/ps3)). If you are using express-generator or Webstorm to set up an empty project, youll find example routes in the
/routes folder. Probably the easiest approach is to modify one of those files.
A route using the GET method that returns a fixed string, which can be anything that you like. The response should be a JSON object with one key/value pair, such as {string: Hey now}, that is passed into a Pug template for rendering.
A route using the POST method that returns a similar response as b. above but gets its parameter from the request body rather than the URL string. (To test this from Postman, select POST as the method, then click the Body tab. Your input parameter should be an x-www-form-urlencoded string.) The response should be a JSON object with two key/value pairs, one for the original string and the second for the length. Pass the object into a Pug template for rendering.
Submit your branch on Gradescope.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CAS CS591 PS3
$25