This project provides the code for frontend and backend of our cards website currently hosted on https://studygrow-cards.herokuapp.com/
To test this project locally you should clone this repository.
To run this project you need to have the Node Package Manager installed, which can be downloaded here: https://www.npmjs.com/get-npm/
Additionally, following environment variables should be present:
PORT=
APP_AUTH_SECRET=
APP_AUTH_GOOGLE_CLIENTID=
APP_AUTH_GOOGLE_SECRET=
APP_AUTH_GOOGLE_REDIRECT_URI=
MONGO_URL_PRODUCTION=
MONGO_URL_TEST=
SECRET=
AUTH_TOKEN_EXPIRATION=
REFRESH_TOKEN_EXPIRATION=
Using the command line navigate to the projects folder and type in the following command:
npm installnpm will install all the dependencies for you. After that use the following command to start the server:
npm run watchThe server will tell you on which port it will be running in the console (80 by default). Navigate to http://localhost:port, where port is the port provdided by the server.
The frontend is built using Angular. The Angular project folder is located in angular-cards. Download and install Angular with:
npm install -g @angular/cliThen navigate to the angular-cards folder and start the Angular Dev Server with the following command:
ng serve --proxy-config proxy.conf.json --openWe use proxy config to bypass CORS problem, caused by angular, when communicating with our server.
After you are done modifying the frontend you can use the following command to build your project:
ng buildAfter the process has finished you can stop the Angular Dev Server and navigate to http://localhost:port, where port is the port provdided by the server.
- MongoDB - Database
- Express - Middleware for handling HTTP requests
- Angular - Frontend
- NodeJs - Backend Server
- Passport - Middleware for Authentication
- and much more
- Erdzan Rastoder - Original idea, Initial work - Github
- Ben Lakhoune - Initial work - Github - Website
This project is licensed under the MIT License
- stackoverflow for guiding us in our ignorance