Skip to content

Instantly share code, notes, and snippets.

@JrogeT
Last active September 27, 2022 00:08
Show Gist options
  • Select an option

  • Save JrogeT/386a7d993ee516cacd7163f2a3b29be4 to your computer and use it in GitHub Desktop.

Select an option

Save JrogeT/386a7d993ee516cacd7163f2a3b29be4 to your computer and use it in GitHub Desktop.
steps
Procfile:
web: npm start
package.json:
"start": "node /dist/project/abc.js"
"build": "tsc"
"dependencies":[
..
"tslint": "x.x.xx",
..
]
gitlab-ci.yml:
stages:
- deploy
Heroku Deploy:
image: node:latest
before_script:
- apt-get update -qy
- apt-get install -y ruby-dev
- gem install dpl
stage: deploy
image: ruby:latest
script:
- dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY
environment:
name: Develop Environment
url: https://sw1-back.herokuapp.com
only:
- develop
server.ts:
// @ts-ignore
app.listen(process.env.PORT || port, () => {
console.log(`Backend Services NodeJs is listening at port:${port}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment