5.11.0 • Published 26 days ago

@baseplate-sdk/web-app v5.11.0

Weekly downloads
-
License
See LICENSE file
Repository
github
Last release
26 days ago

Baseplate web app

Running locally

First, install pnpm and Docker. Ensure your NodeJS version is >=20.

# Create .env files
cp .env.example .env.dev

# Now fill in values of .env.dev

# Now pnpm install
pnpm install
pnpm run develop

# new terminal tab
pnpm exec sequelize db:migrate
pnpm exec sequelize db:seed:all

open http://localhost:7600

Visual Studio Code debugging

To debug the NodeJS server in Visual Studio Code, first start up the database and frontend:

pnpm run dev:vscode

Then click on "Run and Debug" in VS Code, and press Start for Develop Backend.

Connecting to local database

docker-compose exec db bash
psql baseplate
# show tables
\dt
select * from "Users";

Database migrations

Database migrations are done via sequelize cli. You must run them manually whenever there's a new migration. Make sure you are running pnpm run develop or pnpm run develop:db before attempting to run migrations.

# Run migrations
pnpm exec sequelize db:migrate

# Undo last migration
pnpm exec sequelize db:migrate:undo

# Undo all migrations
pnpm exec sequelize db:migrate:undo:all

# Create migration
pnpm exec sequelize migration:create --name INSERTNAMEHERE

Seed data

Seed data (sample user, etc) is created via sequelize cli. You must run them manually. Make sure you are running pnpm run develop or pnpm run develop:db before attempting to seed.

# Run seeds
pnpm exec sequelize db:seed:all

# Undo last migration
pnpm exec sequelize db:seed:undo

# Undo all seeds
pnpm exec sequelize db:seed:undo:all

# Create migration
pnpm exec sequelize seed:create --name INSERTNAMEHERE

Nuking your database

If you want to just nuke your database and start fresh, run the following commands:

docker-compose down -v
docker-compose up -d
sleep 1
pnpm exec sequelize db:migrate
pnpm exec sequelize db:seed:all
5.11.0

26 days ago

5.10.0

1 month ago

5.9.2

1 month ago

5.9.1

1 month ago

5.9.0

2 months ago

5.8.0

2 months ago

5.7.0

2 months ago

5.6.0

2 months ago

5.5.0

3 months ago

5.4.0

3 months ago

5.3.0

3 months ago

5.2.0

3 months ago

5.1.0

4 months ago

5.0.0

4 months ago

4.0.1

4 months ago

4.0.0

4 months ago

3.0.0

5 months ago

2.11.0

5 months ago

2.9.2

5 months ago

2.9.1

5 months ago

2.10.0

5 months ago

2.9.0

5 months ago

2.8.0

5 months ago

2.7.0

6 months ago

2.6.0

6 months ago

2.5.1

10 months ago

2.5.0

1 year ago

2.4.0

1 year ago

2.3.0

1 year ago

2.1.2

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago