blacksrc / sports-poll

Simple polling system around some sports events based on nodejs and react.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decription

This project is a simple poll app based on Nodejs, React and Mongodb.

Installation Guide

First off, clone the project:

$ git clone git@github.com:blacksrc/sports-poll.git

Backend

  1. Install MongoDB: Install MongoDB Community Edition

  2. Install migrate-mongo globally:

$ sudo npm install -g migrate-mongo
  1. Install nodemon globally:
$ sudo npm install -g nodemon
  1. cd into backend directory.

  2. 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>
  1. Install dependencies.
$ npm i
  1. CD into backend directory and run the migrations:
$ migrate-mongo up
  1. Finally, run project in a development mode.
$ npm run development

Frontend

  1. cd into frontend directory.

  2. Install dependencies.

$ npm i
  1. Rename .env.example file to .env. Then open the renamed file and add your environment variables:
API_HOST=<HOST: localhost>
API_PORT=<PORT: 3001>
  1. Run project in a development mode.
$ npm run development

Todo

  • 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.

About

Simple polling system around some sports events based on nodejs and react.


Languages

Language:JavaScript 86.5%Language:SCSS 12.3%Language:HTML 0.7%Language:Shell 0.5%