posatutor.blogg.se

Expressjs todolist reminder app
Expressjs todolist reminder app













expressjs todolist reminder app

run npm install cors in the todo-backend directory, and then add the snippet below to the top of your index.js file in the root of todo-backend directoryĬonst cors = require("cors") app.use(cors()) Almost There :) In other words, without enabling cors on the backend, even Axios will not able to send our request to the API. Cors - allows cross domain http request.

expressjs todolist reminder app

Axios - allows us to send http request from out react frontend to our todo API run npm install axios in the todo-frontend directory.Additional Packagesīefore we can start coding, we have to install some additional packages to make this work. In part 2, we will create the react frontend and connect it to our API backend to GET, POST, UPDATE, and DELETE our todos. Congratulation on completing part 1 of the tutorial on how to create a todo app with React and NodeJS.















Expressjs todolist reminder app