next.jsreact.jsApollographqlmongodbexpress.js
-
Create a file called dev.js in following path
server/config/ -
Copy below code and paste it in dev.js
module.exports = { mongoURI: 'Your mongo uri', SESSION_SECRET: 'You can add you session secret' } -
Copy below code and paste it in
next.config.jsmodule.exports = { env: { BASE_URL: 'http://localhost:3000/graphql' } } -
Before starting, Run the below command it will populate sample data in your mongodb.
npm run populateDB -
Finally run
npm run devcommand.