These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
By default, the server will expect to connect to a MongoDB instance running on localhost:27017. However, you can customize the environment to use different values for the MongoDB host. To do that, you can create a .env
file for specifying credential information for MongoDB.
Create a new file called .env
, with the following properties:
MONGO_URL=mongodb+srv://<username>:<password>@sandbox.jadwj.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
MONGO_USER=username
MONGO_PASSWORD=password
PORT=5000
or instead, you can use the equivalent JSON:
{
"mongo": {
"url": "mongodb+srv://<username>:<password>@sandbox.jadwj.mongodb.net/myFirstDatabase?retryWrites=true&w=majority",
"user": "username",
"password": "password"
"port": "5000"
}
}
Where the URL, username, and password are set to your preferences.
Installing NPM modules on both client and server folders
Execute these commands from the project root directory
npm install
cd client && npm install
Open a terminal on root directory
npm run start
and open another terminal on client directory
cd client && npm start
Access the web app at http://localhost:3000/
FRONTEND
BACKEND
👤 Samir Mansour
- Github: @smyrmnsr