Open Jean-alien opened 7 months ago
sign into Render w/github credential
start new Web Service
connect to GitHub Repo
give it a unique name (unique on web, not unique to just your acc't like github) mine: icecold-polar-render
pick what branch to deploy from. I chose iss3.
Web Server Settings:
Runtime = Node
Build Command = npm
Start Command = node app.js
"Create Web Service" big purple button --> create web
Refactor with port binding
link url: https://docs.render.com/web-services
const express = require('express')
const app = express()
const port = process.env.PORT || 5500;
app.get('/', (req, res) => {
res.send('Hello World from Express')
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})
※ The log says my web server is alive.
※ my web server icecold-polar-render runs successfully.
$ git checkout -b iss4 ==> create a new branch iss4
$ node app.js ==> execute javaScript
※ receive a response:
'mike app listening on port 5500'
※ my localhost connected successfully.
change settings --> switch branch to iss4.
$ git add app.js ==> save changes of file
$ git commit -m 'added port binding' ==> leave a quote about the feature
$ git push --set-upstream origin iss4 ==> upoad to the repository in branch
※ branch issue 4 created on my GitHub repository and code uploaded on my repository.
identify a PasS ==> render.com