Skip to content

jayhuynh/be-creamcats

Repository files navigation

CreamCats - Backend App

Usage

To start, run:

$ docker-compose up

This will start:

  • the node backend app on port 6400
  • the postgreSQL database on port 6401

To change any of these ports, edit the .env file.

Please run these commands when 1) starting backend first time, or 2) have a new schema update:

$ npm run db-reset
$ npm run db-generate

To view the database, run:

$ npm run db-view

This will run the prisma stdio (database viewer) in your browser on port 5555.

Mock Accounts

User/Volunteer

  • Login:
{
  "email": "netcat@uq.edu.au",
  "password": "123456",
  "type": "volunteer"
}

Organization

  • Login:
{
  "email": "contact@wesleymission.qld.au",
  "password": "123456",
  "type": "organization"
}

API Doc

View the API doc

$ npm run api-doc

This should open the doc at http://localhost:6400/api-doc.

Known issues

Permission denied for prisma/migrations directories

You may encounter Permission denied for directories in prisma/migrations, especially when creating new migrations yourself. My theory is that these directories are created inside of the container, and a user on the host container do not have write permission to them by default. One way (not necessary the best way) to fix this, for now, is:

$ sudo chmod -R +rw prisma/migrations

(If anyone knows any better, let me know).

Documentation

See the wiki.

Workflow

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages