From 7047db51d8bc142ada921bc8954ce3522ad1c4ef Mon Sep 17 00:00:00 2001 From: Wolvan Date: Sat, 8 Jan 2022 17:43:08 +0100 Subject: [PATCH] Make app heroku-ready Add a procfile and make the start not try to build the project. --- Procfile | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..0cd71ec --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: npm run heroku \ No newline at end of file diff --git a/package.json b/package.json index e7b7bcd..82d05ff 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,9 @@ "build": "rimraf ./dist && tsc", "test": "npm run lint && npm run find-todo && npm run mocha", "debug": "ts-node-dev --inspect --respawn --clear ./src/main.ts", - "start": "npm test && npm run build && node ./dist/main.js", + "start:build": "npm test && npm run build && node ./dist/main.js", + "start": "node ./dist/main.js", + "heroku": "npm run start -- --port env:PORT --use-mysql --mysql-host env:MYSQL_HOST --mysql-port env:MYSQL_PORT --mysql-user env:MYSQL_USER --mysql-password env:MYSQL_PASSWORD --mysql-database env:MYSQL_DATABASE", "prepublish": "npm test && npm run build" }, "repository": {