Skip to content

Commit

Permalink
feat: second step to replace sequelize with prisma, the api is now wo…
Browse files Browse the repository at this point in the history
…rking
  • Loading branch information
AnthonyLzq committed Jul 31, 2023
1 parent 5cf3d34 commit 5db6de1
Show file tree
Hide file tree
Showing 8 changed files with 305 additions and 316 deletions.
16 changes: 11 additions & 5 deletions example/fastify-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"main": "src/index.ts",
"description": "This is a test using fastify with prisma",
"scripts": {
"build:dev": "webpack --mode development",
"build": "webpack --mode production",
"lint": "eslint src/* --ext .ts --fix",
"service": "nodemon",
"start": "ts-node src/index.ts",
"start": "node dist/index.js",
"release": "standard-version",
"test:ci": "jest --ci -i",
"test:local": "NODE_ENV=local jest --ci -i"
Expand All @@ -19,8 +21,8 @@
"@types/http-errors": "^2.0.1",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"axios": "^1.4.0",
"dotenv": "^16.3.1",
"eslint": "^8.46.0",
Expand All @@ -41,7 +43,11 @@
"ts-loader": "^9.4.4",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.1.6"
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0"
},
"nodemonConfig": {
"watch": [
Expand All @@ -52,7 +58,7 @@
"ignore": [
"src/**/*.test.ts"
],
"exec": "DEBUG=App:* npx ts-node -r dotenv/config ./src/index"
"exec": "npx ts-node -r dotenv/config ./src/index"
},
"dependencies": {
"@fastify/cors": "^7",
Expand Down
116 changes: 58 additions & 58 deletions example/fastify-prisma/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/fastify-prisma/src/network/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Server implements Log {
try {
await this.#connection?.disconnect()
await this.#app.close()
d(`HTTP server stopped.`)
d('HTTP server stopped.')
} catch (e) {
this.log({
method: this.stop.name,
Expand Down
2 changes: 1 addition & 1 deletion example/fastify-prisma/src/schemas/user.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Static, Type } from '@sinclair/typebox'

import { id } from './id'
import { id } from '.'

const user = Type.Object({
lastName: Type.String(),
Expand Down
Loading

0 comments on commit 5db6de1

Please sign in to comment.