Skip to content

guidefari/mail-bag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Notes

www.mysite.com/users/add - The word add is a verb, which makes this a non-RESTful URL. Only nouns go into the URL because nouns describe things or states of things

const app = express();
app.get("/cars/:vin", function(inRequest, inResponse) {
// Return a car object with the specific VIN number
});
app.listen(8080);

vin (which you can then access in the function by doing inRequest.params.vin).

app.use(express.json()); - This middleware takes care of parsing incoming request bodies that contain JSON, as many of ours will. Our application code will, thanks to this middleware, receive a JavaScript object resulting from the incoming data, saving us the hassle of parsing it ourselves.

resources consumed

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors