Skip to content

Setting up your development environment

Bodhi Mulders edited this page Apr 30, 2021 · 4 revisions

This page describes how to set up ShiraKamiSRS on your local machine for development.

Prerequisites

Setup

  1. First of all, fork this repository and clone it to your local machine.

    $ git clone <git_repository_url>
    

Frontend Setup

  1. cd into shirakami-srs-web/
  2. Run npm install or yarn to grab the latest dependencies, and wait until it completes (Some files are generated on post-install).
  3. You can configure the basic application settings which are normally configured through environment variables, via src/assets/appsettings.json. You should not need to edit this file though, it's set up for development purposes by default.
  4. Run npm run start or yarn start to run the frontend. You can access it on http://localhost:4200/.

Backend Setup

  1. cd into shirakami-srs-api/
  2. Run npm install or yarn to grab the latest dependencies, and wait until it completes (Some files are generated on post-install).
  3. Create a file .env within shirakami-srs-api/. In here you can configure environment variables to configure the backend, in familiar X=Y fashion. You can find all configuration options here. It is recommended to configure the following:
    • Database connection (MYSQL_*)
    • TYPEORM_LOGGING (To your preference)
    • SMTP_SUPPRESS (To true)
    • APP_SERVE_HTTP (To false)
  4. Run npm run start:dev or yarn start:dev to run the backend. If it gives you any errors, check your .env configuration.

Extra

If you have any problems setting up your development environment, feel free to shoot me a message in Discord!