NPM node based CLI package to provide a fast, complete and reliable way to publish, deploy or test SPA (Angular projects) via Node + Express server.
NSSPA creates an express server file to serve SPA in development and production enviroments. Simple.
- A pc with any O.S. capable of run node.
- Internet access. You don't need 1Gb, but it's cool.
- Node.js 12+ minimun.
Easy as pie, run: npm install @manelcecs/node-server-spa
ps: yes, a bit long... sorry.
Did i say this is fast and easy? No? O.K.
This package is fast and easy to use. Just run on your root folder: nsspa
TIP: NodeServerSinglePageApplication, just to keep it in mind.
The CLI will ask the name of your server file. Just press enter to let default server.js
or type the name you want.
Try not to set directory or weird strings, it will crash or worse, it's going to append .js
at the end.
Time to configure your server.
-
PORT: the local port where the server will listen.
-
Distribution folder: the compiled static folder where your application will be serverd.
-
Access Point: this is the html file where all javascript static files are indexed, by default is
index.html
but if you've changed it, let the cli know.
That's all. Now you can run npm run nsspa-deploy
.
The next steps, is test. Test it a lot.
But then:
- Optimiced servers for each framework
- Docker and Docker compose files
- ...