This app is setup to run in a docker container initiated from the main repo
but before you do that you need to run cp .env.dist .env
and then set your JWT_SECRET (same as client) and add your X_LISTENAPI_KEY
instructions on how to get your own listennotes key kan be found her.
Once you have all this setup you go to the main repo and follow the instructions there.
Note that it's possible to run this application just bye using:
yarn
yarn start
or
npm install
npm run start
But you will have to configure and set up your own mongodb if you chose to do so
Any change should trigger a restart of nodemon in the container (same if your just using yarn start
)
Migrations can be created and run with yarn md-seed run
inside the container note that new sedders should be added to the /seeders directory and imported into the md-seed-config.js note that the paths for imports should start with ../dist/
this is importent since we need to run the transpield versions of the src files to run this on the server, this also means that you will need to run yarn build
localy before running the seeders (and re run that comand if any changes that your seeders are effected bye has been made in src).
Also note that if you are runing the docker containers with production settings (using Dockerfile_Prod
and docker-compose.yml
) you will need to run both yarn build-seeders
and yarn build-seeder-conf
before building the containers this creates transpield versions of the fiels that Dockerfile_Prod
will copy into the container
For more instructions on how to write a seeder take a look at md-seed
Workspace settings found in .vscode/settings.json If you are not using vs code please add corresponding settings for your editor. It's also recomended to install the folowing plugins for vs code:
ESLint Prettier Flow Language Suport
These plugins allong with the workspace settings will help you to auto-format you code on save as well as give you tipps on how to writ better code
To install flow on your machine: brew install flow (for mac & linux) npm install --global flow-bin (for windows)
Precommit-hook added which runs eslint to check that the linting rules are beeing followed, if there are any errors you will be forced to fix them befor you commit