Why Express Starter?

Normally boilerplates like MEAN.io or MEAN.js or any other, use MongoDB or some other unstructured database.

Using unstructured databases provides the developer with the ability to manipulate the database in JSON format. Well, the mapping part is a bit tricky when it comes to unstructured databases, and the manipulation of structural databases can be made easier by querying the necessary info (for example – select * from tableName). In such cases, great results can be achieved when we use Node.js with the structured database, PostgreSQL.

Express Starter provides you with a view using Angular and Express.js for routing, and Node.js on the back-end, along with that the storage partner PostgreSQL.

Codebase Example (With Relation to Mapping)

The following example shows fetching a list of movie names right from a database to your view.

Folder Structure (From the Route Directory)

Config – Configuration for a passport or any other secret key that needs to be provided.Controllers – Logical arena where the mapping between the models occurs (by exporting the repositories) and where we call it in view.Migrations – Creating tables using the schema’s provided in the model.Public – Contains a list of all Stylesheets, Images, and JavaScript for the view.Repositories – Contains individual files for each module consisting of querying in order to fetch the appropriate data.Seeders – Made up of 'by default values' which need to be set in the individual records. For example, if we need to assign a username and password (master username and password), this allows us to seed the created username/password record so that it’s fetched right away.Services – Consists of the services (Generic functions) which we need to use in our various controllers.Views – Consist of .ejs files with the main file named layout.ejs, wherein we import the other sub .ejs files.app.js – Route for the controllers to be sent to the views (the entire mapping is done here).package.json – Necessary modules can be installed using npm.

About the Existing Project Made in Express Starter

An internal CRM for all employees wherein employees can apply, leave, see events, and more. Having 4 roles involved (Including – Admin, HR, Manager, Employee) the project is under development with new features coming up.

For any query with relation to express starter, you guys are most welcome to view my GitHub repo.