![]() Inside of the src folder create a main.js file, a lib folder, a middleware folder, a model folder, and a route folder.From the root of your backend repo create a src folder.Navigate into your editor and open your project."test": "jest -i -verbose -coverage -runInBand", Your package.json should have all of the installed dependencies as well as these scripts: MONGODB_URI=mongodb://localhost/mern-starter ![]() env file should contain your environment variables:ĪPI_URL= CORS_ORIGINS= APP_SECRET='something secret' With that, we’ve got our basic scaffolding setup for the backend.Then, run npm i -S express http-errors mongoose superagent body-parser cors dotenv.cd into the backend repo and run npm init -y.Clone both repos into the mern-stack directory.Create a backend and a frontend repo on github or using the command line.Create a directory on your computer called mern-starter (or whatever you like).Node.js has a fast code execution as it is built on Google Chrome’s JavaScript Engine.It supports open-source JavaScript Runtime Environment. ![]()
0 Comments
Leave a Reply. |