Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WepApp Starter

This project is organized as a npm workspace. This is a monorepo for two projects.

./server
./web

Install dependencies

npm install

Create databases

cd ./server
# Run migrations
npm run migrate
# Add seed dta
npm run seed

Start a dev server (api server)

npm run server

Start a web app in a separate terminal

npm run web

Build and Run

npm run build Then

cd dist
sh ./run.sh

Docker

To build a docker image use the following command:

docker build -t webapp-starter .

To run use the following:

docker run -d -p 8080:8080 [-e ENV_VAR=value]* webapp-starter:latest

e.g.

docker run -d -p 8080:8080
  -e LOG_LEVEL=info
  webapp-starter:latest

Following env values can be set:

LOG_LEVEL=info
API_LOG_LEVEL=debug
DEBUG=true

Adding seed data and creating new migrations

cd ./server
npx knex --knexfile db/knexfile.js migrate:make <migration_name>
# Seed
npx knex --knexfile db/knexfile.js seed:make <seed_name>

About

A starter web application with Fastify API server & React UI

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages