Skip to content

Commit

Permalink
refactor: add signup test, fix register, set tsc to main transpile an…
Browse files Browse the repository at this point in the history
…d update packages
  • Loading branch information
Murzbul committed Feb 7, 2023
1 parent 86b6aea commit fcbcfbc
Show file tree
Hide file tree
Showing 21 changed files with 345 additions and 123 deletions.
10 changes: 4 additions & 6 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Set to production when deploying to production
NODE_ENV=development

SET_COOKIE_SECURE=false
SET_COOKIE_SAME_SITE=Lax

# Node.js server configuration
SERVER_PORT=8089

# App
APP_DEFAULT=AppKoa
APP_PATH=/usr/app
APP_PORT=8089
APP_SET_APP_PROXY=false
APP_SET_COOKIE_SECURE=false
APP_SET_COOKIE_SAME_SITE=Lax

# Database configuration
DB_HOST=db
Expand Down
9 changes: 5 additions & 4 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"env": "NODE_ENV",
"serverPort": "SERVER_PORT",
"setCookieSecure": "SET_COOKIE_SECURE",
"setCookieSameSite": "SET_COOKIE_SAME_SITE",
"auth": {
"authorization": "AUTHORIZATION"
},
"app": {
"default": "APP_DEFAULT",
"path": "APP_PATH"
"path": "APP_PATH",
"serverPort": "APP_PORT",
"setAppProxy": "APP_SET_APP_PROXY",
"setCookieSecure": "APP_SET_COOKIE_SECURE",
"setCookieSameSite": "APP_SET_COOKIE_SAME_SITE"
},
"dbConfig": {
"TypeORM": {
Expand Down
9 changes: 5 additions & 4 deletions config/default.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"env": "local",
"serverPort": 8089,
"setCookieSecure": false,
"setCookieSameSite": "Lax",
"app": {
"default": "AppKoa",
"path": "/usr/app"
"path": "/usr/app",
"serverPort": 8089,
"setAppProxy": false,
"setCookieSecure": false,
"setCookieSameSite": "Lax"
},
"auth": {
"authorization": false
Expand Down
12 changes: 8 additions & 4 deletions config/production.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"env": "production",
"nodePath": "/app",
"serverPort": 80,
"setCookieSecure": true,
"setCookieSameSite": "None",
"app": {
"default": "AppKoa",
"path": "/usr/app",
"serverPort": 80,
"setAppProxy": true,
"setCookieSecure": false,
"setCookieSameSite": "None"
},
"auth": {
"authorization": true
}
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.4'
version: '3.6'

services:
node:
Expand Down Expand Up @@ -28,7 +28,7 @@ services:
context: docker/mongo/
dockerfile: Dockerfile
ports:
- "27017:27017"
- "27018:27017"
networks:
- experiencenet
environment:
Expand Down
2 changes: 1 addition & 1 deletion nodemon.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"watch": [
"src/*"
],
"exec": "pnpm build && node --inspect=0.0.0.0:9229 ./dist/src/index.js",
"exec": "pnpm build-tsc && node --inspect=0.0.0.0:9229 ./dist/src/index.js",
"legacyWatch": true,
"ext": "js,ts,json,hbs"
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"dependencies": {
"@deepkit/core": "1.0.1-alpha.77",
"@deepkit/type": "1.0.1-alpha.85",
"@koa/cors": "^4.0.0",
"@koa/multer": "^3.0.0",
"@mikro-orm/core": "^5.6.2",
"@mikro-orm/postgresql": "^5.6.2",
Expand Down Expand Up @@ -61,7 +62,6 @@
"jwt-simple": "^0.5.6",
"koa": "^2.13.4",
"koa-bodyparser": "^4.3.0",
"koa-cors": "^0.0.16",
"koa-helmet": "^6.1.0",
"koa-qs": "^3.0.0",
"koa-ratelimit": "^5.0.1",
Expand Down Expand Up @@ -106,10 +106,10 @@
"@types/jwt-simple": "^0.5.33",
"@types/koa": "^2.13.4",
"@types/koa-bodyparser": "^4.3.7",
"@types/koa-cors": "^0.0.2",
"@types/koa-hbs": "^1.0.7",
"@types/koa-ratelimit": "^4.2.4",
"@types/koa-router": "^7.4.4",
"@types/koa__cors": "^3.3.0",
"@types/koa__multer": "^2.0.4",
"@types/lodash": "^4.14.180",
"@types/md5": "^2.3.2",
Expand All @@ -136,10 +136,10 @@
"jest-environment-jsdom": "^28.1.3",
"jest-environment-node": "^28.1.3",
"lint-staged": "^13.1.0",
"madge": "^5.0.1",
"madge": "^6.0.0",
"nodemon": "^2.0.20",
"pg-mem": "^2.6.4",
"prettier": "^2.7.1",
"prettier": "^2.8.3",
"rimraf": "^3.0.2",
"supertest": "^6.3.0",
"ts-node": "^10.9.1",
Expand Down
Loading

0 comments on commit fcbcfbc

Please sign in to comment.