cse341-week03's Introduction
Application Flow ---------------------------------------------------------- Folder flow: Root Folder > routes > controllers > views File flow: app.js > homeRoute.js > homeController.js > indexView.ejs Heroku with mongoDB ---------------------------------------------------------- Every Heroku app has its own Heroku-hosted Git repo. You deploy new versions of your app by pushing your code changes to this repo. In order to do that, your local Git repo needs to know the URL of the Heroku-hosted repo. Heroku's architecture requires the use of config vars. Express calls .listen(PORT), which makes use of the Heroku config var. Using || to initialize PORT's value to the first defined variable. When app is run on Heroku, process.env.PORT is defined and passed to .listen(). Running locally, the config var is undefined and the localhost port is passed to .listen(). Basic Commands: sudo npm install -g heroku heroku plugins:install heroku-repo heroku login heroku git:remote -a cse341nodejsapp git push heroku master:main heroku ps:scale web=1 heroku logs --tail heroku repo:reset --app appname https://devcenter.heroku.com/articles/preparing-a-codebase-for-heroku-deployment https://devcenter.heroku.com/articles/heroku-cli#download-and-install https://devcenter.heroku.com/articles/git#tracking-your-app-in-git https://devcenter.heroku.com/articles/deploying-nodejs
cse341-week03's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.