Skip to content

Commit 96efeca

Browse files
committed
🚀 Create production structure
1 parent 7e98762 commit 96efeca

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
.env
3-
yarn.lock
3+
yarn.lock
4+
build

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"main": "index.js",
55
"license": "MIT",
66
"scripts": {
7-
"dev": "nodemon --watch \"src/\" --exec \"ts-node src/index.ts\" -e ts"
7+
"dev": "nodemon --watch \"src/\" --exec \"ts-node src/index.ts\" -e ts",
8+
"build": "rimraf ./build && tsc",
9+
"start": "npm run build && node build/index.js"
810
},
911
"dependencies": {
1012
"cors": "^2.8.5",
@@ -16,7 +18,8 @@
1618
"@types/cors": "^2.8.7",
1719
"@types/express": "^4.17.8",
1820
"nodemon": "^2.0.4",
21+
"rimraf": "^3.0.2",
1922
"ts-node": "^9.0.0",
2023
"typescript": "^4.0.2"
2124
}
22-
}
25+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
1212
// "sourceMap": true, /* Generates corresponding '.map' file. */
1313
// "outFile": "./", /* Concatenate and emit output to single file. */
14-
"outDir": "./dist", /* Redirect output structure to the directory. */
14+
"outDir": "./build", /* Redirect output structure to the directory. */
1515
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
1616
// "composite": true, /* Enable project compilation */
1717
// "removeComments": true, /* Do not emit comments to output. */

0 commit comments

Comments
 (0)