Skip to content

Sparkable is a collection of links that have brought lasting new insight to people

Notifications You must be signed in to change notification settings

sparkable-cc/Sparkable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

40cdca9 · Sep 28, 2023
Aug 1, 2023
Sep 26, 2023
May 5, 2023
Sep 28, 2023
Nov 18, 2022
Nov 23, 2022
Sep 7, 2023
Nov 18, 2022
Dec 22, 2022
Jul 31, 2023
Nov 30, 2022

Repository files navigation

PERN Stack Boilerplate

Boilerplate for a React/Express/PostgreSQL app.

Quick Start

Development - Backend

First step: cd into the backend directory.

$ cd backend

Then, you need to make a .env file with the contents of the .env.txt file.

$ cp .env.txt .env

Now you can launch the backend by running:

$ docker compose up

This runs the backend server on http://localhost:5000. Also the PgAdmin server on http://localhost:8080.

Migrations

To execute the migrations:

$ docker compose exec backend npm run typeorm migration:run -- -d ./dist/data-source.js

To revert the last migration:

$ docker compose exec backend npm run typeorm migration:revert -- -d ./dist/data-source.js

Development - Frontend

First step: cd into the frontend directory.

$ cd frontend

Then, you need to make a .env file with the contents of the .env.txt file.

$ cp .env.txt .env

The frontend can be launched by running:

$ npm run dev

or if you use yarn

$ yarn dev

This runs the frontend server on http://localhost:3000. All requests will be proxied to the backend.

Deployment

Both the frontend and backend can be deployed by running in /:

$ docker compose -f docker-compose-prod.yml up

This runs the deployed website on http://localhost:8000.

Doc

In doc folder:

  • endpoints

Boilerplate inspired in https://github.com/V-Wong/pern-stack-template

About

Sparkable is a collection of links that have brought lasting new insight to people

Resources

Stars

Watchers

Forks

Languages