All Projects β†’ maximegris β†’ Typescript Express Sequelize

maximegris / Typescript Express Sequelize

Licence: other
Easily bootstrap your NodeJS project with Express, Sequelize and Typescript πŸ‘

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Typescript Express Sequelize

Connect Session Sequelize
Sequelize SessionStore for Express/Connect
Stars: ✭ 179 (+38.76%)
Mutual labels:  sequelize, express
Express Starter
It's a hackathon-starter fork, but designed to use PostgreSQL by default (or MySQL)
Stars: ✭ 215 (+66.67%)
Mutual labels:  sequelize, express
Node Express Postgresql Sequelize
Node.js, Express.js, Sequelize.js and PostgreSQL RESTful API
Stars: ✭ 148 (+14.73%)
Mutual labels:  sequelize, express
Typescript Express Starter
πŸš€ TypeScript Express Starter
Stars: ✭ 238 (+84.5%)
Mutual labels:  sequelize, express
Online Bling
Stars: ✭ 9 (-93.02%)
Mutual labels:  sequelize, express
Meme Studio
πŸ“Œ A complete and fast website building in React/Express for creating and sharing "internet memes"
Stars: ✭ 51 (-60.47%)
Mutual labels:  sequelize, express
Crate
πŸ‘• πŸ‘– πŸ“¦ A sample web and mobile application built with Node, Express, React, React Native, Redux and GraphQL. Very basic replica of stitchfix.com / krate.in (allows users to get monthly subscription of trendy clothes and accessories).
Stars: ✭ 2,281 (+1668.22%)
Mutual labels:  sequelize, express
React Express Fullstack
Full stack (mostly unopinionated) starter pack with React+Redux and Expressjs
Stars: ✭ 23 (-82.17%)
Mutual labels:  sequelize, express
Express
Express + Sequelize + Winston + Jasmine + TypeScript + Webpack MVC Boilerplate
Stars: ✭ 9 (-93.02%)
Mutual labels:  sequelize, express
Aclify
πŸ”’ Node Access Control Lists (ACL).
Stars: ✭ 49 (-62.02%)
Mutual labels:  sequelize, express
Express Sequelize Crud
Simply expose resource CRUD (Create Read Update Delete) routes for Express & Sequelize. Compatible with React Admin Simple Rest Data Provider
Stars: ✭ 65 (-49.61%)
Mutual labels:  sequelize, express
Call My Congress
DEPRECATED. Simple app that displays contact information for US Congress representatives by district.
Stars: ✭ 125 (-3.1%)
Mutual labels:  express
Githubdocs
Easily build a searchable documentation app using markdown files in your Github Repo or local Markdown files.
Stars: ✭ 122 (-5.43%)
Mutual labels:  express
Docx
Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
Stars: ✭ 2,150 (+1566.67%)
Mutual labels:  express
Express Static Gzip
Simple wrapper on top of serveStatic, that allows serving pre-gzipped files as well as other types of compressions.
Stars: ✭ 119 (-7.75%)
Mutual labels:  express
Hot Reload All The Things
Starter project for HMR with backend routes and server/client-side react.
Stars: ✭ 127 (-1.55%)
Mutual labels:  express
Resource Router Middleware
🚴 Express REST resources as middleware mountable anywhere
Stars: ✭ 124 (-3.88%)
Mutual labels:  express
Heroes Angular Serverless
TypeScript Node/Express πŸ‘‰TypeScript Serverless βž•Angular
Stars: ✭ 119 (-7.75%)
Mutual labels:  express
Movie Website
🎬基于 Node.js + Express + mongoDB + Bootstrap ζ­ε»Ίηš„η”΅ε½±η½‘η«™γ€‚
Stars: ✭ 118 (-8.53%)
Mutual labels:  express
Tokencaps
A middleware framework and persistence layer to aggregate and normalize crypto-currency data.
Stars: ✭ 118 (-8.53%)
Mutual labels:  express

Logo

Build Status License

Introduction

Easily bootstrap your Typescript project with NodeJS + Express + Sequelize ORM. ❀️

Installation

Run one of the command below

npm install
npm install -g yarn
yarn

The build tasks use Gulp tasks runner. Typescript is transpiled to Javascript in the /build directory. This sample use PostgreSQL database but you can easily change it and use your favorite relational database (npm or yarn command) :

npm install --save mysql // For both mysql and mariadb dialects
npm install --save sqlite3
npm install --save tedious // MSSQL

Configure your database

Sequelize configuration and entities can be found in /Src/sqlz directory.

Directory Description
config Your database configuration.
migrations Your database migrations scripts. Keep this files in Javascript and run sequelize db:migrate to migrate your database schema.
models Sequelize entities.

First, define your database schema in config/config.json file. Use Sequelize CLI to initialize your database.

In models/ directory, the index.ts file define the DbConnection interface. When you create a new Sequelize entity, add its reference in this interface to fully use Typescript's superpower !

Run the project

npm start

Your web server is now exposed on http://localhost:3000

GET /api/languages

curl -X GET -H 'Content-Type: application/json' http://localhost:3000/api/languages

POST /api/languages

curl -X POST -H 'Content-Type: application/json' -d '{"label":"French","name":"fr"}' http://localhost:3000/api/languages

GET /api/appusers

curl -X GET -H 'Content-Type: application/json' http://localhost:3000/api/appusers

POST /api/appusers

curl -X POST -H 'Content-Type: application/json' -d '{"email":"[email protected]","pwd":"something"}' http://localhost:3000/api/appusers

Build

npm run build

Lint your code before you commit!

In a collaborative project, it's always a pain when you have to work on files not correctly formatted. Now before each commit, yout typescript files are linted based on your tsconfig.json > .editorconfig > tslint.json files.

Ξ» git commit -m "Example precommit"

> husky - npm run -s precommit

25l[14:22:30] Running tasks for src/**/*.ts [started]
[14:22:30] prettify [started]
[14:22:31] prettify [completed]
[14:22:31] git add [started]
[14:22:31] git add [completed]
[14:22:31] Running tasks for src/**/*.ts [completed]
25h25h[master 23c4321] Example precommit
 1 file changed, 1 insertion(+), 1 deletion(-)

By the way you can also run the command with a npm script

npm run prettify

Debug with Typescript and VSCode

Add breakpoints to your Typescript source code and launch in VSCode the "Debug Typescript" task. When you'll access to an endpoint, you will be able to debug directly in your Typescript's files.

Questions and issues

The github issue tracker is only for bug reports and feature requests.

Roadmap

  • [x] Add Sequelize Typescript example with association
  • [x] Manage multiple database configuration with NODE_ENV
  • [ ] Add Swagger API Framework
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].