DEV Community

Discussion on: Making a Single Page App in ye good olde JS (ES6)

Collapse
 
krisnaahroid profile image
ahroidlife

How to deploy? are you using pm2 to deploying your app?

Collapse
 
rishavs profile image
Rishav Sharan

its a pure JS SPA. so to deploy you will just put on a CDN like you would put any static resources. Your web server would serve a pretty much empty index.html when user navigates to your domain. The html file will then fetch the SPA from the CDN and render them.

You can use PM2 to run a node server to serve the html file. Or just use something like netlify/surge etc to get rid of all ops work