Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
You've configured Sequelize, initialized a connection to the SQLite database, and synced the Article model with the database. In this video, you will work on the routes for data creation.
The request's body
property returns an object containing the key/value pairs of data submitted in the request body. The following app.use()
methods, written in app.js
, provide access to the request body.
// view engine setup
...
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
Resources
- Reduce Error Handling Code When Using Async/Await
- VSCode extension to explore and query SQLite databases
Sequelize has recently updated the structure of their docs. If you're following along with the video, you can access the old layout via the link below! Don't worry, the instructions are all the same!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up