Skip to content

Instantly share code, notes, and snippets.

View seriousManual's full-sized avatar
🐷
stuff

Manuel Ernst seriousManual

🐷
stuff
View GitHub Profile
@ryanoglesby08
ryanoglesby08 / server.js
Last active June 21, 2024 14:11
A node.js SPA server that serves static files and an index.html file for all other routes.
/*
Incredibly simple Node.js and Express application server for serving static assets.
DON'T USE THIS IN PRODUCTION!
It is meant for learning purposes only. This server is not optimized for performance,
and is missing key features such as error pages, compression, and caching.
For production, I recommend using an application framework that supports server-side rendering,
such as Next.js. https://nextjs.org