barrycumbie / solid-fishstick-snowcats

Dr. Cumbie (yet again) re-staring a class repo for CIS 486 Spring '24 | https://solid-fishstick-snowcats.onrender.com
https://barrycumbie.github.io/solid-fishstick-snowcats/
GNU General Public License v3.0
1 stars 18 forks source link

git my localhost on the web (PaaS) #4

Open barrycumbie opened 9 months ago

barrycumbie commented 9 months ago

identify a PaaS ==> render.com

barrycumbie commented 9 months ago

sign into render w/github creds

start new Web Service

cxn to GitHub Repo

give it a unique name (unique on web, not unique to just your acc't like github)

pick what branch to deploy from e.g. main or iss3

Runtime = Node

Build Command = npm

Start Command = node app.js

"Create Web Service" big purple button

barrycumbie commented 9 months ago

TODO: Build Command = yarn (not npm)

barrycumbie commented 9 months ago
Screen Shot 2024-01-18 at 6 33 58 PM
barrycumbie commented 9 months ago

refactor with port binding

from this docu: https://docs.render.com/web-services#port-detection


const express = require('express')
const app = express()
const port = process.env.PORT || 4000;

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
barrycumbie commented 9 months ago

reset render deploy to this branch

Screen Shot 2024-01-18 at 6 42 52 PM