DEV Community

Discussion on: Building a Single Page App without frameworks 🔥

Collapse
 
bassforce86 profile image
James King • Edited

Just a side note: Express is itself, a framework.

I don't mean this as an inflammatory statement, just for those that may not know.

Collapse
 
dcodeyt profile image
Dom (dcode)

True - more accurately I probably should have mentioned "front-end" framework

Collapse
 
michaelcurrin profile image
Michael Currin

Express is more of a dev dependency here for local dev convenience and can be swapped out for other approaches, including VS Code Live Server or Python builtin HTTP server.

Or http-server for NPM which can be installed globally and run in the project root.

Collapse
 
michaelcurrin profile image
Michael Currin

BTW In production you would use Nginx to serve your static assets (HTML and JS). Or upload them to GitHub Pages and let that serve it for you. No NPM server needed.

Using Express in production is suitable if you want to build an API or maybe do frontend templating (like Python Flask does). That you can make your content dynamic like with get data from a database. Instagram is a single application which does something like this.