Clone this repository to your local machine to use Express...
-
On vs code, hold
command + shift + pto show command bar -
Search for Docker on pop-up tool bar and select:
Docker: Add Docker Files to Workspace -
Select
Node.jsApplication Platform -
Choose
Package.jsonfile -
Choose default port or input alternative:
3000 -
Select
Noon Include optional Docker Compose files? -
Dockerfileand.dockerignorefiles would be created (Edit as see fit) -
On terminal, enter below to build:
docker build -t accountName/fileName . - On terminal, enter below to run image as container:
docker run -p 4000:3000 accountName/fileName> - To rename image:
docker image tag #imageId accountName/newFileName:latest Extra:
To list all running connections on a port:
sudo lsof -i :<PORT>To kill all running connections on a port:
sudo kill -9 <PID>
1. cd <dir> 2. git init 3. git add . 4. git commit -m "commit message" 5. curl https://cli-assets.heroku.com/install.sh | sh (Enter device password if present) 6. heroku login 7. heroku create 8. git push heroku master/main 9. heroku apps:rename newName (To rename app)