Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
TOJ 87d1f40ad9 :sparkles: added testing via ava with coverage via nyc vor 5 Jahren
..
db :sparkles: added migrations per table | added seed data | updated mock vor 5 Jahren
lib :sparkles: added testing via ava with coverage via nyc vor 5 Jahren
server :pencil: backend | updated README | using env variables vor 5 Jahren
tests :sparkles: added testing via ava with coverage via nyc vor 5 Jahren
.nycrc :sparkles: added testing via ava with coverage via nyc vor 5 Jahren
README.md :pencil: backend | updated README | using env variables vor 5 Jahren
knexfile.js :sparkles: first pass at initial db migration | uupdated docs vor 5 Jahren
package-lock.json :sparkles: added testing via ava with coverage via nyc vor 5 Jahren
package.json :sparkles: added testing via ava with coverage via nyc vor 5 Jahren

README.md

siimee backend API

An API for the siimee application

:white_check_mark: Prerequisites

You will need…

Node.js 14+

:package: Installation

  1. Install dependencies with npm install
  2. Copy the environments sample file from ./server/.env.sample and rename it to ./server/.env
  3. Fill out your database connection details in ./server/.env
  4. A test database container is provided and can be started with docker-compose --env-file ./backend/server/.env up -d
  5. Populate some basic tables for your database using npx knex migrate:latest

:package: Migrations

We use Knex.js,which comes with a couple nice database migration and seeding tools. Migrating tracks changes in schema. Migration steps are contained in the ./db/migrations folder. Seeding adds dummy data once our database tables have been created and schemas are set. Starting seed steps are contained in ./db/seeds and use the mock.js file as the main dummy data source.

Migrating

  • Run npm run migrate to run all migrations and establish the base schema
  • Run npm run unmigrate to roll back one migration

Seeding

  • Run npm run seed to seed the database with dummy data

Restarting

Since we can’t unseed the database, it’s best to destroy the dev database and rebuild it.

  1. Stop the database by navigating to the project root directory cd ../ and running docker-compose down
  2. Destroy the database volume docker volume rm siimee_db. BE CAREFUL.
  3. Restart the database while still at the project root with docker-compose --env-file ./backend/server/.env up -d
  4. Recreate schemas and tables but navigating to ./backend and running npm run migrate
  5. Reseed the dummy data with npm run seed

:electric_plug: Run

  1. Run npm run start to start up the server

:robot: Deployment

TBD

:pill: Tests & Code Quality

TBD

:heart: Built With