A simple Node.js backend application created in the Skylab Starter Node.js course by RocketSeat. This app handles data from a MongoDB database with mongoose and uses express to provide an api to front-end clients.
- Install node.js
- Run
git clone https://github.com/luisfelipesantos/jshunt-backend.git
- Go into the cloned folder.
cd jshunt-backend
- Run
npm install
- Run
npm start
The app uses a MongoDB database. So you must have a MongoDB database installed. You can do this by installing a mongodb docker container or by creating a remote database in MongoDB Atlas.
After that, yous must reference this database in the server.js
file.
mongoose.connect(
"mongodb://[DATABASE IP or URL]/nodeapi",
{useNewUrlParser: true,
useUnifiedTopology: true}
);