Skip to content

Repository files navigation

Phases - API

Phases is a shift marketplace, connecting workplaces with workers to provide manage, and complete work shifts.

This the server application for Phases, exposing an API for managing Phases' users and data.

Getting started

Environment

This project uses three env files test, development, and production, and supplies a file .env.example with the variables necessary for the project to run. Copy this file to the three envs described using the script npm run envinit.

Setup

# install dependencies
npm install

# create, migrate, and seed database
npm run db:dev:init

# clear and re-seed database
npm run db:dev:reseed

# start server in watch mode
npm run start:dev

Endpoint reference

Response payloads are exclusively in JSON.

General payload: payload.schema

This API utilizes a JSON Web Token to authenticate users. For 🔑 protected routes, a JWT must be sent as a bearer token.

Accounts

Client accounts are represented by User objects.

POST /account/signup

Create a User.

POST /account/login

Authenticate self as a User and obtain a token.

🔑 GET /account

Get details of own User.

🔑 PATCH /account

Update details of own User.

About

Shift marketplace platform. Solo toy project.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages