/nodejs-express-server-project-starter

Basic express server to easily start a new project with minimal secure configuration

Primary LanguageJavaScriptMIT LicenseMIT

PROJECT STARTER : A simple node server with express

A basic express server to easily start a new project.

Server logic in app.js Routes logic in routes folder Controllers logic in controller folder

Minimal securing

Not enough ? Yeah you're right, it's a minimal securing configuration ;) feel free to suggest or add new features !

Installation and use

mkdir your-folder-name
cd your-folder-name
git init
git pull https://github.com/CookedIdeas/extra-simple-express-server.git
npm i
npm start

Port 3000 is used by default. If needed, change it in .env file.

Only http://localhost:8888 is authorized as an origin. If needed, you can add or remove allowed origins : search for "yourAllowedOrigins" constant in app.js and modify the object as needed.

To test the server, make a GET request at http://localhost:3000/api/test (make sure to use an allowed origin).

Happy coding ;) Feel free to give feedback or suggest modifications and new features !

What's next ?

Content-filter package will be replaced by a sanitizer.

Other backend starter pack in a near future : A strapi (a node.js headless CMS) starter pack. An express.js server with mongoDB logic starter pack.