File tree Expand file tree Collapse file tree 12 files changed +5183
-9432
lines changed
Expand file tree Collapse file tree 12 files changed +5183
-9432
lines changed Original file line number Diff line number Diff line change 1- # File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
2- # Created by https://www.toptal.com/developers/gitignore/api/node,vercel
3- # Edit at https://www.toptal.com/developers/gitignore?templates=node,vercel
4-
51# ## Node ###
62# Logs
73logs
@@ -145,9 +141,64 @@ dist
145141# ## Vercel ###
146142.vercel
147143
148- # End of https://www.toptal.com/developers/gitignore/api/node,vercel
149-
150- # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
151-
152-
153- .vercel
144+ # ## VisualStudioCode ###
145+ .vscode /*
146+ ! .vscode /settings.json
147+ ! .vscode /tasks.json
148+ ! .vscode /launch.json
149+ ! .vscode /extensions.json
150+ ! .vscode /* .code-snippets
151+
152+ # Local History for Visual Studio Code
153+ .history /
154+
155+ # Built Visual Studio Code Extensions
156+ * .vsix
157+
158+ # ## VisualStudioCode Patch ###
159+ # Ignore all local history of files
160+ .history
161+ .ionide
162+
163+ # ## Windows ###
164+ # Windows thumbnail cache files
165+ Thumbs.db
166+ Thumbs.db:encryptable
167+ ehthumbs.db
168+ ehthumbs_vista.db
169+
170+ # Dump file
171+ * .stackdump
172+
173+ # Folder config file
174+ [Dd ]esktop.ini
175+
176+ # Recycle Bin used on file shares
177+ $RECYCLE.BIN /
178+
179+ # Windows Installer files
180+ * .cab
181+ * .msi
182+ * .msix
183+ * .msm
184+ * .msp
185+
186+ # Windows shortcuts
187+ * .lnk
188+
189+ # ## yarn ###
190+ # https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
191+
192+ .yarn /*
193+ ! .yarn /releases
194+ ! .yarn /patches
195+ ! .yarn /plugins
196+ ! .yarn /sdks
197+ ! .yarn /versions
198+
199+ # if you are NOT using Zero-installs, then:
200+ # comment the following lines
201+ ! .yarn /cache
202+
203+ # and uncomment the following lines
204+ # .pnp.*
Original file line number Diff line number Diff line change 1- import app from " ../app.js" ;
2- import indexRouter from " ../routes/index.js" ;
1+ import app from ' ../app.js' ;
2+ import indexRouter from ' ../routes/index.js' ;
33
4- app . use ( " /api/" , indexRouter ) ;
4+ app . use ( ' /api/' , indexRouter ) ;
55
6- export { default } from " ../app.js" ;
6+ export { default } from ' ../app.js' ;
Original file line number Diff line number Diff line change 1- import process from " node:process" ;
1+ import process from ' node:process' ;
22import express , {
3- type Express ,
4- type NextFunction ,
5- type Request ,
6- type Response
7- } from " express" ;
8- import cors from " cors" ;
9- import helmet from " helmet" ;
3+ type Express ,
4+ type NextFunction ,
5+ type Request ,
6+ type Response ,
7+ } from ' express' ;
8+ import cors from ' cors' ;
9+ import helmet from ' helmet' ;
1010
1111const PORT = process . env . PORT ?? 5000 ;
1212
1313const app : Express = express ( ) ;
1414
15- app . set ( " port" , PORT ) ;
15+ app . set ( ' port' , PORT ) ;
1616app . use ( helmet ( ) ) ;
1717app . use ( cors ( ) ) ;
1818app . use ( express . json ( ) ) ;
1919app . use ( ( request : Request , response : Response , next : NextFunction ) => {
20- response . removeHeader ( " X-Powered-By" ) ;
21- next ( ) ;
20+ response . removeHeader ( ' X-Powered-By' ) ;
21+ next ( ) ;
2222} ) ;
23- app . use ( express . urlencoded ( { extended : false } ) ) ;
23+ app . use ( express . urlencoded ( { extended : false } ) ) ;
2424
2525export default app ;
Original file line number Diff line number Diff line change 1- import app from "./app.js" ;
2- import logger from "morgan" ;
3- import routes from " ./routes/router.js" ;
1+ import logger from 'morgan' ;
2+ import app from './app.js' ;
3+ import routes from ' ./routes/router.js' ;
44
5- app . use ( logger ( " dev" ) ) ;
6- app . use ( "/" , routes ) ;
5+ app . use ( logger ( ' dev' ) ) ;
6+ app . use ( '/' , routes ) ;
77
8- app . listen ( app . get ( " port" ) , ( ) => {
9- console . log ( " Server started. Go to http://localhost:" + app . get ( " port" ) ) ;
8+ app . listen ( app . get ( ' port' ) , ( ) => {
9+ console . log ( ' Server started. Go to http://localhost:' + app . get ( ' port' ) ) ;
1010} ) ;
Original file line number Diff line number Diff line change 44 "main" : " dist/app.js" ,
55 "license" : " MIT" ,
66 "type" : " module" ,
7- "dependencies" : {
8- "cors" : " ^2.8.5" ,
9- "express" : " ^4.18.2" ,
10- "helmet" : " ^6.1.5" ,
11- "jsdom" : " ^21.1.1"
12- },
137 "scripts" : {
148 "vercel:start" : " vercel dev" ,
159 "vercel:build" : " vercel build" ,
1610 "vercel:deploy" : " vercel deploy" ,
1711 "vercel:deploy:prod" : " vercel deploy --prod" ,
18- "build" : " pnpm clean && pnpm tsc" ,
12+ "build" : " yarn clean && yarn tsc" ,
1913 "dev" : " nodemon --exec ts-node dev-server.ts" ,
2014 "clean" : " rimraf dist" ,
2115 "test" : " xo" ,
2216 "test:fix" : " xo --fix"
2317 },
18+ "dependencies" : {
19+ "cors" : " ^2.8.5" ,
20+ "express" : " ^4.18.2" ,
21+ "helmet" : " ^7.1.0" ,
22+ "jsdom" : " ^23.0.1"
23+ },
2424 "devDependencies" : {
25- "@types/cors" : " ^2.8.13 " ,
26- "@types/express" : " ^4.17.17 " ,
27- "@types/jsdom" : " ^21.1.1 " ,
28- "@types/morgan" : " ^1.9.4 " ,
25+ "@types/cors" : " ^2.8.17 " ,
26+ "@types/express" : " ^4.17.21 " ,
27+ "@types/jsdom" : " ^21.1.6 " ,
28+ "@types/morgan" : " ^1.9.9 " ,
2929 "morgan" : " ^1.10.0" ,
30- "nodemon" : " ^2.0.22" ,
31- "rimraf" : " ^4.4.1" ,
32- "typescript" : " ^4.9.5" ,
33- "vercel" : " ^28.18.5" ,
34- "xo" : " ^0.53.1"
30+ "nodemon" : " ^3.0.2" ,
31+ "rimraf" : " ^5.0.5" ,
32+ "ts-node" : " ^10.9.2" ,
33+ "typescript" : " ^5.3.3" ,
34+ "vercel" : " ^33.0.1" ,
35+ "xo" : " ^0.56.0"
3536 }
3637}
You can’t perform that action at this time.
0 commit comments