Skip to content

Commit

Permalink
easier dev and test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
balajiv113 committed Dec 16, 2022
1 parent 59e7f16 commit 0709220
Show file tree
Hide file tree
Showing 11 changed files with 1,977 additions and 306 deletions.
6 changes: 6 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#This is a minimal needed configuration for development

NODE_ENV=development
APP_URL=localhost
DB_CONNECTION=sqlite
APP_KEY=IDU2cMbrvS6iv5841YmFJSjnIqT1X1Nx
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#This is a example file with all the available configuration options.

NODE_ENV=development
APP_URL=localhost
DB_CONNECTION=sqlite
Expand Down
3 changes: 3 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#This is a minimal needed configuration for test

NODE_ENV=test
ASSETS_DRIVER=fake
SESSION_DRIVER=memory
APP_KEY=IDU2cMbrvS6iv5841YmFJSjnIqT1X1Nx
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ tags

# Adonis directory for storing tmp files
tmp
build
public/assets

# Environment variables, never commit this file
.env
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ engine-strict = true
unsafe-perm = true
legacy-peer-deps = true
frozen-lockfile = false
auto-install-peers = true
2 changes: 1 addition & 1 deletion config/drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default driveConfig({
| the `DRIVE_DISK` environment variable.
|
*/
disk: Env.get('DRIVE_DISK'),
disk: Env.get('DRIVE_DISK', 'local'),

disks: {
/*
Expand Down
8 changes: 0 additions & 8 deletions env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ export default Env.rules({

APP_KEY: Env.schema.string(),
APP_NAME: Env.schema.string(),
SESSION_DRIVER: Env.schema.string(),

DRIVE_DISK: Env.schema.enum(['local'] as const),
NODE_ENV: Env.schema.enum(['development', 'production', 'test'] as const),

PG_HOST: Env.schema.string({ format: 'host' }),
PG_PORT: Env.schema.number(),
PG_USER: Env.schema.string(),
PG_PASSWORD: Env.schema.string.optional(),
PG_DB_NAME: Env.schema.string(),
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"license": "MIT License",
"scripts": {
"prepare": "is-ci || husky install",
"dev": "node ace serve --watch",
"dev": "ENV_PATH=.env.development node ace serve --watch",
"build": "node ace build --production",
"start": "node server.js",
"test": "node ace test",
"test": "ENV_PATH=.env.test node ace test",
"lint": "tsc --noEmit && eslint \"**/*.{js,mjs,ts}\"",
"lint:fix": "eslint --fix \"**/*.{js,mjs,ts}\"",
"reformat-files": "prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,mjs,ts,scss}\"",
Expand Down
Loading

0 comments on commit 0709220

Please sign in to comment.