This is basic boiler plate in contruction for REST API with Deno
- Deno > 1.0
- Mysql = 5.7
- Typescrip
Duplicate .env.exemple file and rename it to .env, fill the env informations
Run above commands:
Migrate
$ deno run --allow-net --allow-read https://deno.land/x/nessie/cli.ts migrate
$ deno run --inspect -A --allow-env --unstable -c tsconfig.json src/bin/www.ts
Using Nessie ORM - https://github.com/halvardssm/deno-nessie
-
init
: Generates anessie.config.ts
filedeno run --allow-net --allow-read --allow-write https://deno.land/x/nessie/cli.ts init
-
make [name]
: Create migrationdeno run --allow-net --allow-read --allow-write https://deno.land/x/nessie/cli.ts make create_users
-
migrate
: Run migration - will migrate all migrations in your migration folder (sorted by timestamp) newer than the latest migration in your dbdeno run --allow-net --allow-read https://deno.land/x/nessie/cli.ts migrate
deno run --allow-net --allow-read https://deno.land/x/nessie/cli.ts migrate -c ./nessie.config.ts
-
rollback
: Rollback - will rollback the latest migrationdeno run --allow-net --allow-read https://deno.land/x/nessie/cli.ts rollback
-c, --config
: Path to config file, will default to ./nessie.config.ts-d, --debug
: Enables verbose output