Skip to content

Commit 1cd4783

Browse files
authored
Merge pull request #1303 from masb0ymas/dev
Dev
2 parents 5dd6097 + 4655c81 commit 1cd4783

File tree

116 files changed

+3247
-3020
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+3247
-3020
lines changed

.env.docker-production

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SEQUELIZE_DATABASE=expresso
2828
SEQUELIZE_USERNAME=postgres
2929
SEQUELIZE_PASSWORD=postgres
3030
SEQUELIZE_SYNC=false
31+
SEQUELIZE_LOGGING=true
3132
SEQUELIZE_TIMEZONE=Asia/Jakarta
3233

3334
MAIL_DRIVER=smtp
@@ -51,9 +52,12 @@ REDIS_PORT=6379
5152
REDIS_PASSWORD=
5253

5354
STORAGE_PROVIDER=minio
54-
STORAGE_HOST= # for minio only
55+
STORAGE_HOST=127.0.0.1 # for MinIO
56+
STORAGE_PORT=9000 # for MinIO
5557
STORAGE_ACCESS_KEY=
5658
STORAGE_SECRET_KEY=
5759
STORAGE_BUCKET_NAME=expresso
5860
STORAGE_REGION=ap-southeast-1
5961
STORAGE_SIGN_EXPIRED=7d
62+
63+
OPEN_STREET_MAP_URL=https://nominatim.openstreetmap.org

.env.docker-staging

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SEQUELIZE_DATABASE=expresso
2828
SEQUELIZE_USERNAME=postgres
2929
SEQUELIZE_PASSWORD=postgres
3030
SEQUELIZE_SYNC=false
31+
SEQUELIZE_LOGGING=true
3132
SEQUELIZE_TIMEZONE=Asia/Jakarta
3233

3334
MAIL_DRIVER=smtp
@@ -51,9 +52,12 @@ REDIS_PORT=6379
5152
REDIS_PASSWORD=
5253

5354
STORAGE_PROVIDER=minio
54-
STORAGE_HOST= # for minio only
55+
STORAGE_HOST=127.0.0.1 # for MinIO
56+
STORAGE_PORT=9000 # for MinIO
5557
STORAGE_ACCESS_KEY=
5658
STORAGE_SECRET_KEY=
5759
STORAGE_BUCKET_NAME=expresso
5860
STORAGE_REGION=ap-southeast-1
5961
STORAGE_SIGN_EXPIRED=7d
62+
63+
OPEN_STREET_MAP_URL=https://nominatim.openstreetmap.org

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SEQUELIZE_DATABASE=expresso
2828
SEQUELIZE_USERNAME=postgres
2929
SEQUELIZE_PASSWORD=postgres
3030
SEQUELIZE_SYNC=false
31+
SEQUELIZE_LOGGING=true
3132
SEQUELIZE_TIMEZONE=Asia/Jakarta
3233

3334
MAIL_DRIVER=smtp
@@ -51,9 +52,12 @@ REDIS_PORT=6379
5152
REDIS_PASSWORD=
5253

5354
STORAGE_PROVIDER=minio
54-
STORAGE_HOST= # for minio only
55+
STORAGE_HOST=127.0.0.1 # for MinIO
56+
STORAGE_PORT=9000 # for MinIO
5557
STORAGE_ACCESS_KEY=
5658
STORAGE_SECRET_KEY=
5759
STORAGE_BUCKET_NAME=expresso
5860
STORAGE_REGION=ap-southeast-1
5961
STORAGE_SIGN_EXPIRED=7d
62+
63+
OPEN_STREET_MAP_URL=https://nominatim.openstreetmap.org

.eslintrc.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,25 @@ module.exports = {
1111
'prettier/prettier': 'error',
1212
semi: 'off',
1313
radix: 'off',
14+
'no-new': 'off',
15+
'new-cap': 'off',
16+
'no-shadow': 'off',
1417
'func-names': 'off',
1518
'no-console': 'off',
16-
'no-shadow': 'off',
17-
'no-unused-vars': ['error', { args: 'none' }],
1819
'consistent-return': 'off',
20+
'no-unused-vars': ['error', { args: 'none' }],
1921
'no-underscore-dangle': 'off',
22+
'no-useless-constructor': 'off',
2023
'import/prefer-default-export': 'off',
2124
'import/no-unresolved': 'off',
22-
'new-cap': 'off',
23-
'no-new': 'off',
2425
'import/extensions': 'off',
25-
'no-useless-constructor': 'off',
2626
'@typescript-eslint/no-misused-promises': 'off',
2727
'@typescript-eslint/strict-boolean-expressions': 'off',
2828
'@typescript-eslint/no-useless-constructor': 'error',
2929
'@typescript-eslint/no-extraneous-class': 'off',
3030
'@typescript-eslint/restrict-template-expressions': 'off',
3131
'@typescript-eslint/naming-convention': 'off',
3232
'@typescript-eslint/ban-ts-comment': 'off',
33-
'@typescript-eslint/no-dynamic-delete': 'off',
3433
'n/no-path-concat': 'off',
3534
},
3635
env: {

.swcrc

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,30 @@
1-
[
2-
{
3-
"$schema": "https://json.schemastore.org/swcrc",
4-
"jsc": {
5-
"parser": {
6-
"syntax": "typescript",
7-
"tsx": false,
8-
"decorators": true,
9-
"dynamicImport": false
10-
},
11-
"paths": {
12-
"~/*": ["dist/*"]
13-
},
14-
"target": "es2022",
15-
"loose": true,
16-
"keepClassNames": false,
17-
"externalHelpers": false,
18-
"transform": {
19-
"legacyDecorator": true,
20-
"decoratorMetadata": true
21-
}
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"jsc": {
4+
"parser": {
5+
"syntax": "typescript",
6+
"tsx": false,
7+
"decorators": true,
8+
"dynamicImport": false
229
},
23-
"module": {
24-
"type": "commonjs",
25-
"strict": false,
26-
"strictMode": true,
27-
"lazy": false,
28-
"noInterop": false
10+
"paths": {
11+
"~/*": ["dist/*"]
2912
},
30-
"minify": true
13+
"target": "es2022",
14+
"loose": true,
15+
"keepClassNames": false,
16+
"externalHelpers": false,
17+
"transform": {
18+
"legacyDecorator": true,
19+
"decoratorMetadata": true
20+
}
3121
},
32-
{
33-
"$schema": "https://json.schemastore.org/swcrc",
34-
"jsc": {
35-
"parser": {
36-
"syntax": "ecmascript",
37-
"jsx": false,
38-
"decorators": true,
39-
"dynamicImport": false
40-
},
41-
"paths": {
42-
"~/*": ["dist/*"]
43-
},
44-
"target": "es2022",
45-
"loose": true,
46-
"keepClassNames": false,
47-
"externalHelpers": false,
48-
"transform": {
49-
"legacyDecorator": true,
50-
"decoratorMetadata": true
51-
}
52-
},
53-
"module": {
54-
"type": "commonjs",
55-
"strict": false,
56-
"strictMode": true,
57-
"lazy": false,
58-
"noInterop": false
59-
},
60-
"minify": true
61-
}
62-
]
22+
"module": {
23+
"type": "commonjs",
24+
"strict": false,
25+
"strictMode": true,
26+
"lazy": false,
27+
"noInterop": false
28+
},
29+
"minify": true
30+
}

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# expresso with Sequelize
1+
# expresso with TypeORM
22

3-
[![documentation](https://img.shields.io/badge/Documentation-yes-brightgreen.svg)](https://github.com/masb0ymas/expresso-sequelize#readme)
4-
[![maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/masb0ymas/expresso-sequelize/graphs/commit-activity)
5-
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/masb0ymas/expresso-sequelize/blob/master/LICENSE.md)
3+
[![documentation](https://img.shields.io/badge/Documentation-yes-brightgreen.svg)](https://github.com/masb0ymas/expresso-typeorm#readme)
4+
[![maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/masb0ymas/expresso-typeorm/graphs/commit-activity)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/masb0ymas/expresso-typeorm/blob/master/LICENSE.md)
66

7-
[![version](https://img.shields.io/badge/Version-5.0.3-blue.svg?cacheSeconds=2592000)](https://github.com/masb0ymas/expresso-sequelize/releases/tag/v5.0.3)
7+
[![version](https://img.shields.io/badge/Version-4.3.0-blue.svg?cacheSeconds=2592000)](https://github.com/masb0ymas/expresso-typeorm/releases/tag/v4.3.0)
88
[![Express](https://img.shields.io/badge/Express-4.18.2-informational?logo=express&color=22272E)](https://expressjs.com/)
99
![Node](https://badges.aleen42.com/src/node.svg)
1010
![Eslint](https://badges.aleen42.com/src/eslint.svg)
@@ -13,11 +13,12 @@
1313

1414
## Feature
1515

16-
- [TypeScript](https://github.com/microsoft/TypeScript) `4.9.x`
17-
- [Sequelize](https://github.com/sequelize/sequelize) `6.x`
16+
- [TypeScript](https://github.com/microsoft/TypeScript) `5.1.x`
17+
- [TypeORM](https://github.com/typeorm/typeorm) `0.3.x`
1818
- [Nodemailer](https://github.com/nodemailer/nodemailer) `6.x`
1919
- [Handlebars](https://github.com/wycats/handlebars.js) for templating HTML
2020
- [Yup](https://github.com/jquense/yup) for validation schema `1.x`
21+
- [SWC](https://github.com/swc-project/swc) for build runtime app `1.3.x`
2122
- JavaScript Style [Standard with TypeScript](https://github.com/standard/eslint-config-standard-with-typescript)
2223
- Formating code using [Prettier](https://github.com/prettier/prettier) Integration [Eslint](https://github.com/prettier/eslint-config-prettier) and [TypeScript Eslint](https://github.com/typescript-eslint/typescript-eslint#readme)
2324
- Using [Module Alias](https://github.com/ilearnio/module-alias) for simplify the require/import paths
@@ -30,8 +31,12 @@
3031
1. Clone this repository
3132
2. Duplicate `.env.example` to `.env`
3233
3. Setup database settings inside `.env` file
33-
4. Create your database ( manual )
34+
4. Create your database ( manual ) or run `yarn db:create && yarn db:reset`
3435
5. Run `yarn dev` command
36+
6. Run watch command `yarn dev:watch`
37+
7. Release your app for *Production* or *Staging* with `yarn release`
38+
8. Build your code with Docker `docker build -t yourname/express:v1.0.0 .`
39+
9. Run with docker image `docker run -p 7000:8000 -d yourname/express:v1.0.0`
3540

3641
## Author
3742

assets/locales/en/translation.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
"already_phone": "Phone number already in use",
66
"already_email": "Email already in use",
77
"incorrect_email_or_pass": "Incorrect email or password",
8+
"incorrect_current_pass": "Incorrect current password",
89
"incorrect_phone": "Incorrect phone number",
910
"incorrect_pin": "Incorrect pin",
10-
"incorrect_UUID_format": "Incorrect uuid format",
11+
"incorrect_uuid_format": "Incorrect uuid format",
1112
"invalid_user_login": "Invalid user login",
1213
"session_ended": "The login session has ended, please re-login.",
1314
"otp_expired": "OTP expired",
1415
"in_active_account": "Your account is not active",
1516
"account_not_found": "Account not found or not registered",
1617
"block_policy": "Your account has been blocked for violating policy",
1718
"cant_be_empty": "can't be empty",
18-
"not_found": "data not found or has been deleted",
19+
"not_found": "{{entity}} data not found or has been deleted",
1920
"mail_template": "Invalid template path for email registration",
2021
"too_many_request": "Too Many Requests",
2122
"please_check_your_email": "Please check your email account to verify your email and continue the registration process"

assets/locales/id/translation.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
"already_phone": "Nomor telepon sudah digunakan",
66
"already_email": "Email sudah digunakan",
77
"incorrect_email_or_pass": "email atau kata sandi salah",
8+
"incorrect_current_pass": "kata sandi saat ini salah",
89
"incorrect_phone": "Nomor telepon salah",
910
"incorrect_pin": "Pin salah",
10-
"incorrect_UUID_format": "Format uuid tidak benar",
11+
"incorrect_uuid_format": "Format uuid tidak benar",
1112
"invalid_user_login": "Login pengguna tidak valid",
1213
"session_ended": "Sesi masuk telah berakhir, harap masuk kembali.",
1314
"otp_expired": "OTP kedaluwarsa",
1415
"in_active_account": "Akunmu tidak aktif",
1516
"account_not_found": "Akun tidak ditemukan atau tidak terdaftar",
1617
"block_policy": "Akun Anda telah diblokir karena melanggar kebijakan",
1718
"cant_be_empty": "tidak boleh kosong",
18-
"not_found": "data tidak ditemukan atau telah dihapus",
19+
"not_found": "{{entity}} data tidak ditemukan atau telah dihapus",
1920
"mail_template": "Direktori template email pendaftaran tidak benar",
2021
"too_many_request": "Terlalu Banyak Permintaan",
2122
"please_check_your_email": "silakan periksa akun email Anda untuk memverifikasi email Anda dan melanjutkan proses pendaftaran"

jest.config.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)