GithubHelp home page GithubHelp logo

m0t0r / covid-tracker-backend-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hseireland/covid-tracker-backend-api

0.0 0.0 0.0 113 KB

COVID Tracker backend API

License: MIT License

JavaScript 100.00%

covid-tracker-backend-api's Introduction

Contact Tracing API Service

Set up Backend API

​ The backend API consists of both a Fastify server and a PostgreSQL database. To get these running will require the following steps. You will need Docker installed to run the database. ​

  • Install the dependencies and create a basic environment configuration. ​
npm install
npm run create:env

  • Next, start the database. This will download and install the PostgreSQL container. ​
npm run db:up

  • If this is your first time running the database, you have previously deleted it, or migrations have been added, you will need to run migrations. ​
npm run db:migrate

  • Finally, start the server in development mode. ​
npm run start:dev

Backend API Development

​ There are a number of handy commands you can run to help with development. ​

Command Action
npm run start:dev Run the server in dev mode, automatically restarts on file change
npm run create:env Create a new .env file
npm test Run unit tests
npm run test:watch Run backend tests in watch mode, running on changed test files
npm run db:migrate Run database migrations.
npm run db:up Run the database server
npm run db:down Shutdown the database server
npm run db:delete Delete the database server. You will need to run db:up and db:migrate again.
npm run lint Run eslint
npm run lint:fix Run eslint in fix mode

covid-tracker-backend-api's People

Contributors

colmharte avatar jackmurdoch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.