This project is a simple poll app based on Nodejs, React and Mongodb.
First off, clone the project:
$ git clone git@github.com:blacksrc/sports-poll.git
-
Install MongoDB: Install MongoDB Community Edition
-
Install migrate-mongo globally:
$ sudo npm install -g migrate-mongo
- Install nodemon globally:
$ sudo npm install -g nodemon
-
cd into backend directory.
-
Rename
.env.example
file to.env.development
. Then open the renamed file and add your environment variables:
NODE_ENV=development
NODE_HOST=<HOST: localhost>
NODE_PORT=<PORT: 3001>
NODE_DB_HOST=<DATABASE HOST: localhost>
NODE_DB_PORT=<DATABASE PORT: 27017>
NODE_DB_NAME=<DATABASE NAME: sportspoll>
- Install dependencies.
$ npm i
- CD into backend directory and run the migrations:
$ migrate-mongo up
- Finally, run project in a development mode.
$ npm run development
-
cd into frontend directory.
-
Install dependencies.
$ npm i
- Rename
.env.example
file to.env
. Then open the renamed file and add your environment variables:
API_HOST=<HOST: localhost>
API_PORT=<PORT: 3001>
- Run project in a development mode.
$ npm run development
- Fix frontend env file.
- Improve backend test cases with mongomock.
- Create API documantion using postman.
- Create frontend documantation using Storybook or docz.
- Write some frontend test cases.
- Google login implementation.