Skip to content

This is the backend of a MERN app. The application is for tracking the learning progress of a stundent of a class. Started with Express generator, and contains dockerfiles and some basic tests as well.

Notifications You must be signed in to change notification settings

Prince-Csaba/azgard_learning_backend

Repository files navigation

Tracking learning progress (MERN based school project)

Main technologies

Introduction

This web aplication is a small school project, its main task is to track the progress of a student in a given learning path. The ideea behind the project is to be an MVP, so it contains all the basic, and most important features, and it is easy to fill with lessons and easy to scale up with the understanding of the logic behind the project.

Table of contents

Launch for production (via Docker)

  1. Fork the github repository:

  2. Clone the github repo to your pc.

      $ git clone {insert the name of your repository here}
    
  3. Check for the .env variable, if it does not exist, create as described in step Configure .env variables

  4. Build the docker image of the frontend: Set the frontend directory as your working directory

    cd frontend
    

    If already in frontend directory, build the docker image by running this command in your terminal:

    $ docker build -t trainingfront .
    

    Optional: you can check your docker images with the command above to see if the image was created correctly:

    $ docker images
    

    You can run the image:

    $ docker run -d -p 3000:80 --name react-app trainingfront:latest
    
  5. Build the docker image of the backend: Set the backend directory as your working directory

    cd backend
    

    If already in backend directory, build the docker image by running this command in your terminal:

    $ docker build -t trainingback .
    

    Optional: you can check your docker images with the command above to see if the image was created correctly:

    $ docker images
    

    You can run the image:

    $ docker run -d -p 8000:8000 --name react-app trainingback:latest
    
  6. Run the aplication by docker-compose: As you built the frontend and backend docker images, time come to run the aplication. Type the following command into your console:

    $ docker-compose up
    
  7. Stop the application whenever you want:

    $ docker-compose stop
    

Launch for development

  1. Fork the github repository:

  2. Clone the github repo to your pc.

      $ git clone {insert the name of your repository here}
    
  3. Check for the .env variable, if it does not exist, create as described in step Configure .env variables

  4. Install the dependencies

  • Backend Inside the projects directory, change working directory to ./backend, than run npm install command
      $ cd ./backend
      $ npm install
    
  • Frontend Inside the projects directory, change working directory to ./frontend, than run npm install command
      $ cd ./fontend
      $ npm install
    

*in case of not having NodeJS on your computer, you have install the NodeJS for the backend (see documentation at https://nodejs.org/)

  1. Start the application: You can start the application by running npm start command both in frontend and in backend directories
    npm start
    

Configure the .env variable

Fill in your data in .env.template files at both backend&frontend and rename to .env Google console infos at: Obtain OAuth 2.0 credentials at Google API Console

API Documentation

You can find the endpoint documentation at: http://localhost:8000/docs/#/

Képernyőkép erről: 2021-11-08 12-28-10

About

This is the backend of a MERN app. The application is for tracking the learning progress of a stundent of a class. Started with Express generator, and contains dockerfiles and some basic tests as well.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published