An Angular (2 and up), Full Typescript, Node, Express, Postgresql template.
I was frustrated with the lack of online tutorials about using Typescript for the entire stack in Node applications on the web. I based my initial design off of this excellent example.
The largest advantage to using this template is code generation.
- Proxy is generated from @decorators on the API classes and methods.
- Database Create table (for Postgresql) schemas are generated by marking models with @decorators. The same decorators will also generate the basic CRUD functionality that a project might need.
- PROPOSED: The auto generation of .sql test data from @decorators on the model.
This template also offers a lot of other things.
- A database layer wrapper for making sure all calls happen inside the same transaction without you ever having to commit or rollback manually ever again.
- A wrapped API layer so that you don't have to handle the request, response, next variables ever again. Just create a new API class, decorate as appropriate and be on your way.
- Some base styles to get you off the ground and designing your pages faster.
- A flexbox based grid and grid-column SCSS classes.
- Alerts, buttons and form control styles.
- Install Node 7.0^ (to stay consistent with my current environment).
- Install Postgresql
- Create an database in Postgres.
- Open a terminal and run the following commands.
git clone https://github.com/dustincjensen/neap-template
cd neap-template
npm install
- Create a copy of .example.env rename it to .env
- Set username and password in .env to match what you used for your Postgres database you created in the previous step. Set the database name if it doesn't match as well (it defaults to dev).
npm run grunt full
npm run dev
- You should now be able to create and delete 'Examples' using the pre-rendered example page.
Coming soon.