How to deploy LoopBack 4 application in Heroku

$ npm i -g @loopback/cli
$ lb4 example todo-jwt
$ Projects/loopback4-example-todo-jwt
$ cd loopback4-example-todo-jwt 
$ npm start
Server is running at http://[::1]:3000
git init
web: npm run start:prod
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Transpiled JavaScript files from Typescript
dist*/
*.tsbuildinfo

.DS_Store
.eslintcache
git add . && git commit -am “ci: add heroku deployment configs” && git push
Note: If you named your branch anything else searching with deploy will not list your branch. Please search with the name you used to create your branch
Note: to enable automatic deployments each time you push to main branch click the Enable Automatic Deploys button
Note: this application may not be available the next time you visit this page. However, if you following the steps above you will have your own application available in the URL of your choosing.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mo Modise

Mo Modise

OSS enthusiast with much love for Javascript ecosystem. Currently spending most of my time giving back to OSS projects such as LoopBack, Cypress and Deno