Skip to content

Commit f91bfba

Browse files
committed
Remove chalk, fix fake data loader and docker compose
1 parent 3847665 commit f91bfba

File tree

6 files changed

+19
-26
lines changed

6 files changed

+19
-26
lines changed

Diff for: README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</a>
66
</p>
77

8-
Starter for Node.js, Express API in Typescript and PostgreSQL with jsonwebtoken, joi, Knex, Objection.js and many other popular tools.
8+
This is a API starter template for building a Node.js and Express.js using Typescript and PostgreSQL as database. It includes popular tools such as jsonwebtoken, joi, Knex, Objection.js, and more.
99

1010
## Requirements
1111

@@ -56,13 +56,6 @@ $ yarn dev
5656

5757
### Using Docker
5858

59-
```bash
60-
# Make a copy of `.env.docker` and save as `.env`.
61-
$ cp .env.docker .env
62-
```
63-
64-
Install dependencies and run the application locally.
65-
6659
```bash
6760
$ docker compose up -d api
6861

Diff for: docker-compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919
container_name: "starter-api"
2020
volumes:
2121
- "./:/source"
22+
- "/source/node_modules"
2223
working_dir: /source
2324
depends_on:
2425
- postgres

Diff for: package.json

-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"dependencies": {
5555
"bcrypt": "^5.1.1",
5656
"cors": "^2.8.5",
57-
"date-fns": "^3.6.0",
5857
"dotenv": "^16.4.5",
5958
"express": "4.19.2",
6059
"express-rate-limiter": "^1.3.1",
@@ -83,7 +82,6 @@
8382
"@types/supertest": "^6.0.2",
8483
"@typescript-eslint/eslint-plugin": "^7.4.0",
8584
"@typescript-eslint/parser": "^7.4.0",
86-
"chalk": "^5.3.0",
8785
"concurrently": "^8.2.2",
8886
"eslint": "^8.57.0",
8987
"eslint-plugin-jsdoc": "^48.2.2",

Diff for: scripts/fake-loader.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import chalk from 'chalk';
2-
31
import { bindModel } from '../src/config/db';
42
import factories, { FactoryType } from '../src/database/factories';
53
import * as fake from '../src/utils/fake';
@@ -15,7 +13,7 @@ const { info } = console;
1513
function print<T>(data: T): void {
1614
const jsonData = JSON.stringify(data, null, ' ');
1715

18-
info(chalk.green(jsonData));
16+
info(jsonData);
1917
}
2018

2119
(async (): Promise<void> => {
@@ -30,8 +28,9 @@ function print<T>(data: T): void {
3028
print(await fake.generate(factoryCallback, total));
3129

3230
process.exit(0);
33-
} catch (err) {
34-
info(chalk`{red ${err.message}}`);
31+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
32+
} catch (err: any) {
33+
info(err.message);
3534

3635
process.exit(1);
3736
}

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "ESNext",
4-
"module": "commonjs",
4+
"module": "CommonJS",
55
"lib": ["ESNext"],
66
"outDir": "./build",
77
"rootDir": "./src",

Diff for: yarn.lock

+12-10
Original file line numberDiff line numberDiff line change
@@ -1621,7 +1621,7 @@ caniuse-lite@^1.0.30001587:
16211621
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz#93a3ee17a35aa6a9f0c6ef1b2ab49507d1ab9079"
16221622
integrity sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ==
16231623

1624-
[email protected], chalk@^5.3.0:
1624+
16251625
version "5.3.0"
16261626
resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385"
16271627
integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==
@@ -1931,11 +1931,6 @@ date-fns@^2.30.0:
19311931
dependencies:
19321932
"@babel/runtime" "^7.21.0"
19331933

1934-
date-fns@^3.6.0:
1935-
version "3.6.0"
1936-
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-3.6.0.tgz#f20ca4fe94f8b754951b24240676e8618c0206bf"
1937-
integrity sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==
1938-
19391934
db-errors@^0.2.3:
19401935
version "0.2.3"
19411936
resolved "https://registry.yarnpkg.com/db-errors/-/db-errors-0.2.3.tgz#a6a38952e00b20e790f2695a6446b3c65497ffa2"
@@ -2111,9 +2106,9 @@ [email protected]:
21112106
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
21122107

21132108
electron-to-chromium@^1.4.668:
2114-
version "1.4.719"
2115-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.719.tgz#22a94ce7a5150511ba88e900836039e159efe22c"
2116-
integrity sha512-FbWy2Q2YgdFzkFUW/W5jBjE9dj+804+98E4Pup78JBPnbdb3pv6IneY2JCPKdeKLh3AOKHQeYf+KwLr7mxGh6Q==
2109+
version "1.4.720"
2110+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.720.tgz#7cbe32a4ceb0650d2fbc16886440949cf07610e8"
2111+
integrity sha512-5zwcKNkOj3GN0jBzpcpGonNPkn667VJpQwRYWdo/TiJEHTQswZyA/vALhZFiAXgL5NuK9UarX1tbdvXu3hG6Yw==
21172112

21182113
emittery@^0.13.1:
21192114
version "0.13.1"
@@ -4200,7 +4195,7 @@ mimic-fn@^4.0.0:
42004195
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc"
42014196
integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==
42024197

4203-
[email protected], minimatch@^9.0.1:
4198+
42044199
version "9.0.3"
42054200
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
42064201
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
@@ -4214,6 +4209,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
42144209
dependencies:
42154210
brace-expansion "^1.1.7"
42164211

4212+
minimatch@^9.0.1:
4213+
version "9.0.4"
4214+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51"
4215+
integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
4216+
dependencies:
4217+
brace-expansion "^2.0.1"
4218+
42174219
minimist-options@^3.0.1:
42184220
version "3.0.2"
42194221
resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954"

0 commit comments

Comments
 (0)