Giter Site home page Giter Site logo

dustincjensen / neap-template Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 160 KB

An Angular (2 and up), Full Typescript, Node, Express, Postgresql template.

JavaScript 9.04% TypeScript 70.96% HTML 8.81% CSS 11.19%
nodejs postgres typescript angular express template

neap-template's Introduction

neap-template

An Angular (2 and up), Full Typescript, Node, Express, Postgresql template.

Why?

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.

What does this offer?

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.

How do I get up and running?

  1. Install Node 7.0^ (to stay consistent with my current environment).
  2. Install Postgresql
  3. Create an database in Postgres.
  4. Open a terminal and run the following commands.
git clone https://github.com/dustincjensen/neap-template
cd neap-template
npm install
  1. Create a copy of .example.env rename it to .env
  2. 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
  1. You should now be able to create and delete 'Examples' using the pre-rendered example page.

Where to start?

Coming soon.

neap-template's People

Contributors

dustincjensen avatar

Stargazers

Anil Singh avatar

Watchers

James Cloos avatar  avatar

neap-template's Issues

Api Methods should only take objects as parameters.

Instead of taking multiple parameters, the API methods should take objects and pass the DB context as a property on the object. Along with any other parameters that the API method might need, like the IDs from the url. Each object passed to the API method would be typed and know what it has access to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.