All Projects → albinojunior → node-crudapi-ts

albinojunior / node-crudapi-ts

Licence: other
CRUD boilerplate for create Node Restful API's with Express Framework and Sequelize ORM written in Typescript.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to node-crudapi-ts

dhiwise-nodejs
DhiWise Node.js API generator allows you to instantly generate secure REST APIs. Just supply your database schema to DhiWise, and a fully documented CRUD APIs will be ready for consumption in a few simple clicks. The generated code is clean, scalable, and customizable.
Stars: ✭ 224 (+446.34%)
Mutual labels:  expressjs, sequelize, api-rest, restful-api
Node Express Postgresql Sequelize
Node.js, Express.js, Sequelize.js and PostgreSQL RESTful API
Stars: ✭ 148 (+260.98%)
Mutual labels:  expressjs, sequelize, restful-api
Typescript Restful Starter
Node.js + ExpressJS + Joi + Typeorm + Typescript + JWT + ES2015 + Clustering + Tslint + Mocha + Chai
Stars: ✭ 97 (+136.59%)
Mutual labels:  expressjs, sequelize
Openrank Backend
Free and Open Source Coding Challenges Platform
Stars: ✭ 123 (+200%)
Mutual labels:  expressjs, sequelize
Node Express Mongoose Passport Jwt Rest Api Auth
Node, express, mongoose, passport and JWT REST API authentication example
Stars: ✭ 146 (+256.1%)
Mutual labels:  expressjs, restful-api
express-crud-router
Simply expose resource CRUD (Create Read Update Delete) routes for Express & Sequelize. Compatible with React Admin Simple Rest Data Provider
Stars: ✭ 109 (+165.85%)
Mutual labels:  expressjs, sequelize
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 (-39.02%)
Mutual labels:  expressjs, sequelize
Nodejs Rest Api Project Structure Express
Nodejs project structure practices for building RESTful APIs using Express framework and MongoDB.
Stars: ✭ 134 (+226.83%)
Mutual labels:  expressjs, restful-api
gobarber
Projeto desenvolvido durante as aulas do Bootcamp GoStack10 da Rocketseat
Stars: ✭ 15 (-63.41%)
Mutual labels:  expressjs, sequelize
Sequelize
An easy-to-use and promise-based multi SQL dialects ORM tool for Node.js
Stars: ✭ 25,422 (+61904.88%)
Mutual labels:  nosql, sequelize
Express Typescript Boilerplate
A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
Stars: ✭ 2,293 (+5492.68%)
Mutual labels:  expressjs, restful-api
Grest
Build REST APIs with Neo4j and Flask, as quickly as possible!
Stars: ✭ 102 (+148.78%)
Mutual labels:  nosql, restful-api
fullstack-graphql-angular
Simple Fullstack GraphQL Application with Angular CLI + Redux. API built with Typescript + Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with Angular CLI + Redux + Async Middleware to access the API.
Stars: ✭ 67 (+63.41%)
Mutual labels:  expressjs, sequelize
express-typescript-mongoose-starter
A starter for Node JS, Express, Typescript, Mongoose application
Stars: ✭ 22 (-46.34%)
Mutual labels:  expressjs, restful-api
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 (+58.54%)
Mutual labels:  expressjs, sequelize
hackerAPI
🐓 API for registration, live-site
Stars: ✭ 20 (-51.22%)
Mutual labels:  expressjs, api-rest
Forest Express Sequelize
🌱 Express/Sequelize Liana for Forest Admin
Stars: ✭ 134 (+226.83%)
Mutual labels:  expressjs, sequelize
opentelemetry-ext-js
js extensions for the open-telemetry project
Stars: ✭ 122 (+197.56%)
Mutual labels:  expressjs, sequelize
NodeRestApi
Node.js, Express.js and MongoDB REST API App
Stars: ✭ 38 (-7.32%)
Mutual labels:  expressjs, restful-api
node-server-template
This is Node.js server tidy template / boilerplate with Express (with asyncified handlers, custom error handler) framework and MongoDb. The server use ES6 and above. On different branches you can see different techniques' and technologies' usage, such as Kafka, nodemailer, file download... You also can find postman collections.
Stars: ✭ 116 (+182.93%)
Mutual labels:  sequelize, restful-api

Node CrudAPI Boilerplate | TypeScript

Node boilerplate for create CRUDs and restful API's with Express Framework and Sequelize ORM written in Typescript.

1. Installing

Install dependencies

$ npm i

Installing pm2

$ npm i -g pm2

Environments

Copy .env.example to .env and set environments

2. Database

Install database driver

  • PostgresSQL
$ npm install --save pg pg-hstore
  • MySQL
$ npm install --save mysql2
  • MariaDB
$ npm install --save mariadb
  • SQLite
$ npm install --save sqlite3
  • SQL Server
$ npm install --save tedious

Database Config

Setting config database connection on config file: config/database.js *if you will not use migrations or seeds this config can be created with ".ts" extension more config details

Migrations and Seeders

  • For implements migrations or seeds install sequelize-cli module:
$ npm i -g sequelize-cli
  • Create database/seeders and/or database/migrations folder OBS: You can create seeds or migrations folders individually

  • Create a .sequeilizerc and paste follow code:

module.exports = {
  "config": "./config/database.js", //database config file reference
  "seeders-path": "./database/seeders", //remove if you don't use seeders
  "migrations-path": "./database/migrations" //remove if you don't use migrations
};

Creating Migration

$ sequelize migration:create --name MIGRATION_NAME

Running Migration

$ sequelize db:migrate

Creating Seed

$ sequelize seed:create --name SEED_NAME

Running Seed

$ sequelize db:seed:all

3. Schedules

Installing

  • For implements Schedules install node-schedule module:
$ npm i node-schedule --save
$ npm i @types/node-schedule --save-dev

Configuring

  • Create src/jobs folder and view example of job file.

  • Create src/schedule.ts file ande paste follow code or copy from example

/* src/schedule.ts */
import { resolve } from "path";
import { scheduleJob } from "node-schedule";

import * as fs from "fs";
import { Job } from "./common/interfaces/job";

const env = process.env.NODE_ENV || "development";
const prefix = env == "development" ? "" : "build/";

export default class Schedule {
  public jobs: Job[] = [];

  public constructor() {
    this.getJobs();
  }

  public getJobs = (): void => {
    const path = resolve(`${prefix}src/jobs`);
    let files = fs.readdirSync(path);
    this.jobs = files.map((file): Job => require(`./jobs/${file}`).default);
  };

  public startJobs = (): void => {
    this.jobs.map(
      (job: Job): void => {
        if (job.enabled)
          scheduleJob(job.date, async (): Promise<void> => await job.execute());
      }
    );
  };
}
  • Import src/schedule.ts on app and call startJobs() method on App constructor

4. Running

$ npm run dev

5. Building

DEV

$ npm run build:dev

PROD

$ npm run build

6. Docs

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