Skip to content

3willows/Your-First-Node-REST-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NB if you are NOT following the 2019 video tutorial:

  • You need to add a .env file to set DATABASE_URL to (e.g.) mongodb://localhost/subscribers.

  • For easy testing, install REST Client VS Code plugin and add a "route.rest" file.

Mongoose is now (2024) at version 8, and two minor changes have been made to the code.

At server.js,

mongoose.connect(process.env.DATABASE_URL, { useNewUrlParser: true })

is now

mongoose.connect(process.env.DATABASE_URL)

At routes/subscribers.js

await res.subscriber.remove()

is now

await res.subscriber.deleteOne()

The core concepts in the tutorial are however still applicable as of June 2024.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%