Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aparrett/ts-graphql-heroku-postgresql
Boilerplate
https://github.com/aparrett/ts-graphql-heroku-postgresql
Last synced: 2 days ago
JSON representation
Boilerplate
- Host: GitHub
- URL: https://github.com/aparrett/ts-graphql-heroku-postgresql
- Owner: aparrett
- Created: 2021-07-14T16:35:53.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-14T16:36:13.000Z (over 3 years ago)
- Last Synced: 2024-04-28T06:31:07.374Z (7 months ago)
- Language: TypeScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TS-GraphQL-Heroku-PostgreSQL Boilerplate
This boilerplate was created using my setup from the Trading Dashboard API## Local Installation
1. Clone project
```
git clone github_url
```2. cd into folder
```
cd app_name
```3. Download npm packages
```
yarn
```4. Start PostgreSQL server
5. Create database called `database_name` (from outside psql command line utility)
```
createdb database_name
```6. Add a user with the username `postgres` and password `admin`. You can choose your own username and password but be sure to specify them in the .env file.
7. Connect to the database with psql and add the uuid extension:
```
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
```8. Install Redis
```
brew install redis
```9. Start Redis
```
brew services start redis
```10. Create a filed named `.env` that has the environment variables listed in .env.example. For example:
```
DATABASE_URL=postgresql://username:password@localhost:5432/database_name
REDIS_URL=127.0.0.1:6379
PORT=4000
SESSION_SECRET=my_secret
CORS_ORIGIN=http://localhost:3000
```