All Projects → camesine → Typescript Restful Starter

camesine / Typescript Restful Starter

Licence: mit
Node.js + ExpressJS + Joi + Typeorm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai

Programming Languages

typescript
32286 projects
es2015
71 projects

Projects that are alternatives of or similar to Typescript Restful Starter

express-mysql-rest
Building the simple api with sequelize, mysql and express js. this repository contains the code about how to use sequelize with mysql at express js. for example i have provide the crud operation to this repository. You can also testing the api with chai and mocha with chai-http by this repository
Stars: ✭ 25 (-74.23%)
Mutual labels:  mocha, expressjs, sequelize, chai
template-server-nodejs
No description or website provided.
Stars: ✭ 20 (-79.38%)
Mutual labels:  mocha, sequelize, chai
TvrboReact
Dream starter project: React, Redux, React Router, Webpack
Stars: ✭ 13 (-86.6%)
Mutual labels:  mocha, expressjs, chai
Bombanauts
Bombanauts, inspired by the original Bomberman game, is a 3D multiplayer online battle arena (MOBA) game where players can throw bombs at each other, make boxes explode, and even other players!
Stars: ✭ 54 (-44.33%)
Mutual labels:  expressjs, mocha, chai
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+50.52%)
Mutual labels:  rest-api, expressjs, jwt
api-skel
Webpack + Typescript + Express + Jest + Chai + Gulp
Stars: ✭ 18 (-81.44%)
Mutual labels:  mocha, expressjs, chai
BotBlock.org
BotBlock - The List of Discord Bot Lists and Services
Stars: ✭ 29 (-70.1%)
Mutual labels:  mocha, expressjs, chai
nodejs-integration-testing
Integration testing of a Node.js / Express.js / Sequelize app
Stars: ✭ 23 (-76.29%)
Mutual labels:  mocha, sequelize, chai
nodejs-application-architecture
👨‍🔧 A discussion on how Node.js projects can be organized.
Stars: ✭ 81 (-16.49%)
Mutual labels:  mocha, sequelize, chai
Practicalnode
Practical Node.js, 1st and 2nd Editions [Apress] 📓
Stars: ✭ 3,694 (+3708.25%)
Mutual labels:  rest-api, expressjs, mocha
Node Typescript Koa Rest
REST API boilerplate using NodeJS and KOA2, typescript. Logging and JWT as middlewares. TypeORM with class-validator, SQL CRUD. Docker included. Swagger docs, actions CI and valuable README
Stars: ✭ 739 (+661.86%)
Mutual labels:  rest-api, cors, jwt
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+521.65%)
Mutual labels:  jwt, mocha, chai
Tvrboreact
Dream starter project: React, Redux, React Router, Webpack
Stars: ✭ 13 (-86.6%)
Mutual labels:  expressjs, mocha, chai
Laravel Realworld Example App
Exemplary real world backend API built with Laravel
Stars: ✭ 954 (+883.51%)
Mutual labels:  rest-api, jwt
Nextjs Sequelize
Next.js With Sequelize Web Application, a Full-Stack Web App Development Boilerplate. https://medium.com/@defrian.yarfi/next-js-with-sequelize-web-application-a-full-stack-web-development-a0051074e998
Stars: ✭ 21 (-78.35%)
Mutual labels:  sequelize, jwt
Nodejs Socketio Chat App
MEAN Stack & Socket.IO Real-time Chat App | A MEAN stack based Real Time chat application
Stars: ✭ 45 (-53.61%)
Mutual labels:  rest-api, expressjs
Example Auth
User auth, session & JWT example for ReactQL
Stars: ✭ 51 (-47.42%)
Mutual labels:  sequelize, jwt
Chakram
REST API test framework. BDD and exploits promises
Stars: ✭ 912 (+840.21%)
Mutual labels:  mocha, chai
Dashboard Server
A JSON file RESTful API with authorization based on json-server
Stars: ✭ 48 (-50.52%)
Mutual labels:  rest-api, jwt
Ngx Api Utils
ngx-api-utils is a lean library of utilities and helpers to quickly integrate any HTTP API (REST, Ajax, and any other) with Angular.
Stars: ✭ 92 (-5.15%)
Mutual labels:  rest-api, jwt

Typescript-restful-starter

Node.js + ExpressJS + TypeOrm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai + Supertest

What use is this Starter App?

  • JWT for protecting routes.
  • Clustering mode for loading many forks depending of the CPU's units.
  • Typeorm for ORM.
  • ES2015 the lastest javascript version has promises and async/await
  • Mocha - Chai for testing
  • Supertest to load the entire server into the tests seamlessly

Structure

/app
	/controllers (Controllers of the app)
	/middlewares (Middlewares for the routes of the app)
	/routes (Routes for Controllers of the app)
	/service (Services for using in any Controller)
	/entity (Models configuration for use)
	/repository (Custom queries)
/config
	/Router.ts (Config file for Routing)
	/Database (DB configuration for use)
	/Server.ts (Server configuration)
config.ts (Config file for the app)
tsconfig.json (File configuration typescript)
tslint.json (File configuration rules typescript)
Index.ts (Main file to start the app)

Install

  1. First clone this repository.

     [email protected]:camesine/Typescript-restful-starter.git
    
  2. Download all dependencies.

     npm install
    
  3. Edit the file ./env and add config database like:

DB=test
PASSWORD=root
PORT_DB=3306
SERVER=127.0.0.1
USER_DB=root
  1. Edit the file ./config.ts with your own settings:
const LOCAL_CONFIGURATION = {
    DB: "test",
    DIALECT: "mysql",
    PASSWORD: "",
    PORT_DB: 3306,
    SERVER: "127.0.0.1",
    USER_DB: "root",
};

const PRODUCTION_CONFIGURATION = {
    DB: process.env.DB || "prod",
    DIALECT: process.env.DIALECT || "mysql",
    PASSWORD: process.env.PASSWORD || "",
    PORT_DB: Number(process.env.PORT_DB) || 3306,
    SERVER: process.env.SERVER || "localhost",
    USER_DB: process.env.USER_DB || "root",
};

export const config = {
    SECRET: "HltH3R3",
    PORT_APP: 1344,
    DATABASE: process.env.NODE_ENV === 'PRODUCTION' ? PRODUCTION_CONFIGURATION : LOCAL_CONFIGURATION
}

Start App

When execute any of this commands the app start with clustering, creating many cluster apps depending of the numbers of CPU's your computer had.

Development: In Development mode, the express app is started with nodemon for automatic refresh when changes are made.

npm run dev

Test: Run test in development environment

npm test

Production: Run app in production environment

npm start
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].