Git Product home page Git Product logo

imrlopezag / ts-api-template Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 192 KB

This is an API template made with express and typescript, to speed up your development, it contains repositories and generic services for the typical CRUD actions, based on a Sequelize model, we use it for data persistence

License: MIT License

TypeScript 100.00%
api-template express jwt jwt-authentication typescript typescript-api ts-api-template mongodb mongoose nodejs

ts-api-template's Introduction

Ts-Template-Api

This is an API template made with express and typescript, to speed up your development, it contains repositories and generic services for the typical CRUD actions, based on a Sequelize model, we use it for data persistence

ORM: Sequelize
Language: Typescript
Framework: Express
Database: mySql
Deploy: Vercel,
Auth: JWT
Documentation: Swagger

Badges

MIT License GitHub Last Commit

๐Ÿ› ๏ธ Tools

Node Express Typescript Sequelize Mysql Vercel JWT Swagger Prettier Eslint Ts-Standard

Installation

 git clone https://github.com/ImRLopezAG/Ts-Api-Template.git

 cd my-project
 npm install my-project

 cd my-project
 yarn install my-project

 cd my-project
 pnpm install my-project

 you need to configure .env file like the .env.dev  also you can add your configuration

API Reference

Authenticate with JWT

  Post /api/Auth/Login
Body Type Description
username string Required. username
password string Required. password

Get all items

  GET /api/Entity/List

Get item

 GET /api/Entity/Get/${id}
Parameter Type Description
id string Required. Id of item to fetch

Post item

 Post /api/Entity/Create
Body Type Description
Entity Properties Entity Required. properties of item to fetch

Update item

 Put /api/Entity/Update
Parameter Type Description
id string Required. Id of item to update
Body Type Description
Entity Properties Entity Required. properties of item to put

Delete item

 Delete /api/Entity/Delete
Parameter Type Description
id string Required. Id of item to delete

Users

Get Users

  GET /api/User/List

Get User

  GET /api/User/Get/${id}
Parameter Type Description
id string Required. Id of item to fetch

Get User by email

  GET /api/User/email/${email}
Parameter Type Description
email string Required. Id of item to fetch

Get User by username

  GET /api/User/username/${username}
Parameter Type Description
username string Required. Id of item to fetch

Add User

  Post /api/User/Create
Body Type Description
email string Required.
username string Required.
password string Required.

Update User

  Put /api/User/Update/${id}
Parameter Type Description
id string Required.
Body Type Description
email string Required.
username string Required.
password string Required.

Delete User

  Delete /api/User/Delete/${id}
Parameter Type Description
id string Required.

Authors

๐Ÿ”— Links

portfolio linkedin twitter

ts-api-template's People

Contributors

imrlopezag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.