Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anagmrebelo/flashcard-backend
https://github.com/anagmrebelo/flashcard-backend
academy
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/anagmrebelo/flashcard-backend
- Owner: anagmrebelo
- Created: 2023-08-29T09:28:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-13T12:59:56.000Z (over 1 year ago)
- Last Synced: 2024-11-08T08:55:03.373Z (2 months ago)
- Topics: academy
- Language: TypeScript
- Homepage: https://flashcard-ttks.onrender.com
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mark-fullstack-proj--starter-1
## Usage:
Instead of cloning this project, click "Use this template". This will allow you to create a repo on github which has this project's content but which is not a fork of it.
Make sure you create the repo as being owned by your own account not by the WeAreAcademy organisation.
## Install
`yarn`
## DB Setup
Copy .env.example to .env and set `DATABASE_URL`, `LOCAL_DATABASE_URL` and `PORT` to your liking.
e.g.
```
DATABASE_URL=postgres://someuser:somebigsecretpassword@somedbhost/pastebin
LOCAL_DATABASE_URL=postgres://neill@localhost/pastebin
PORT=4000
```You will need to create your own databases for this project - certainly one remotely and ideally one locally, too, for development and testing.
Hosts for postgres with a free offering include:
- https://render.com
- https://www.elephantsql.com/
- https://supabase.com/## Running locally
`yarn start:dev`
The env var LOCAL_DATABASE_URL will be consulted.
## Running locally against a remote db
`yarn start:dev-with-remote-db`
The env var DATABASE_URL will be consulted.
# Deploying to render.com
To deploy to render.com:
- build command should be `yarn && yarn build`
## Running on render.com
After deployment, render.com should be set up to run either `yarn start` or
`node dist/server.js`The env var DATABASE_URL will be consulted and so must be set on render.com prior to application start.