Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sombriks/simple-sample-express-knex-node

simple-sample-express-knex-node
https://github.com/sombriks/simple-sample-express-knex-node

flyio git-ops knex nodejs

Last synced: about 1 month ago
JSON representation

simple-sample-express-knex-node

Awesome Lists containing this project

README

        

# simple sample node knex

hello world with migrations

```bash
npm install
npm run dev
```

## migrations mini-how-to

- New migration:

```bash
npx knex migrate:make another_migration
```

- Running all up

```bash
npx knex migrate:latest
```

- Running all down

```bash
npx knex migrate:rollback
```

See `knexfile.js` for database details

## Docker image

Build with:

```bash
docker build -t testing-docker-node .
```

Run with:

```bash
docker run --rm -it testing-docker-node
```

You might need to delete image:

```bash
docker rmi testing-docker-node
```

## deploy

Run fly login, fly launch and fly deploy.

Fly lauch will provision a Dockerfile and a github action.
after that you can deploy by commit, which is great.