Here's a RESTful API that interacts with a PostgreSQL database written in NodeJS with Typescript, RESTify, and Sequelize ORM.

Overview

Basic description

REST (Representational State Transfer) is a standard architecture for building and communicating with web services, It typically mandates resources on the web are represented in a text format (like JSON, HTML, or XML) and can be accessed or modified by a predetermined set of operations.
Given that we typically build REST APIs to leverage with HTTP instead of other protocols, these operations correspond to HTTP methods like GET, POST, or PUT.

Here's a RESTful API that interacts with a PostgreSQL database written in NodeJS with Typescript, Restify, and the sequelize ORM.

If a "PORT" environment variable has not been defined then the application currently defaults to port 15100 (see ./src/server.ts).

To start via the terminal navigate to the source code directory and run the following commands (after install "rebuild" will be run automatically)...
$ npm install
$ npm run (re)build
$ npm run start

Example HTTP requests via cURL (be sure to update as needed)

Create a product

curl -i -s -H "Content-Type: application/json" -X POST -d '{"lookupCode":"lookupcode4","count":175}' https://byolabisi.herokuapp.com/api/product/

Update an existing product by record ID

curl -i -s -H "Content-Type: application/json" -X PUT -d '{"id":"bee20aed-5245-46a7-b19c-9ef6abd4ca5c","lookupCode":"lookupcode4","count":200}' https://byolabisi.herokuapp.com/api/product/bee20aed-5245-46a7-b19c-9ef6abd4ca5c

Delete an existing product by record ID

curl -i -s -X DELETE https://byolabisi.herokuapp.com/api/product/bee20aed-5245-46a7-b19c-9ef6abd4ca5c

You might also like...

Nestjs, Sequelize, Mysql Boilerplate

Nestjs - Sequelize - Mysql Boilerplate Description NestJS framework TypeScript starter repository or boilerplate with jwt user authentication. Feature

Aug 27, 2022

Simple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob.

Clean-Architecture Simple REST API using Express with TypeScript, PostgreSQL, and MySQL to practice the Clean Architecture by Uncle Bob. About This RE

Oct 16, 2022

šŸŽµ simple and RESTful API for getting lyrics of any song made using Next.js and ChakraUI.

šŸŽµ simple and RESTful API for getting lyrics of any song made using Next.js and ChakraUI.

playground . guide . discord Overview Lyrist is a simple yet powerful RESTful API for getting lyrics of any song using song name and it's artist name.

Dec 17, 2022

Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime.

Uptime Monitoring API Uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about thei

Jun 14, 2022

Airtable for TypeScript and JavaScript (ES7, ES6, ES5). Supports Airtable database. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

Airtable for TypeScript and JavaScript (ES7, ES6, ES5). Supports Airtable database. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.

TypeAirtable is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be

Sep 11, 2022

MiniSense RESTful API

MiniSense RESTful API Why was it developed This project is part of an activity proposed by SenseUp aimed at approving a selection process for a Back-E

Jan 21, 2022

RESTful service to provide API linting as-a-service

API Linting Service Prerequisites / general idea General idea behind this API implementation is to provide an API as a service based on the awesome sp

Mar 14, 2022

A dockerized uptime monitoring RESTful API server that allows authenticated users to monitor URLs

A dockerized uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime.

Oct 7, 2022

A RESTful API for Bing wallpaper to use easy.

A RESTful API for Bing wallpaper to use easy.

bing-wallpaper A RESTful API for Bing wallpaper to use easy. img src="https://bingw.jasonzeng.dev/?w=800"/ Usage API Endpoint: https://bingw.jasonze

Dec 15, 2022
Owner
Olabisi Oduola
A software engineer building and scaling systems - sometimes in a distributed nature ā€¢ Frontend with the code, Backend with the strokes
Olabisi Oduola
CRUD de productos basado en el ORM sequelize y el login y el registro usando archivo en formato JSON.

Desarrollo de una aplicaciĆ³n muy sencilla, utilizando diferentes recursos ofrecdos por Node.JS. AquĆ­ puedes encontrar : Login - Registro - AdministraciĆ³n de productos completamente funcionales) Recursos utilizados: Middleware - Express validator - Validaciones del lado del Front-End - y del Back-End - SessiĆ³n - Cookies - Multer, entre otros)

Ɓngel Daniel Fuentes Segura 4 Sep 12, 2022
A Deno ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud

A Deno ORM for MySQL, SQLite, PostgreSQL, MongoDB, GitHub and serverless service like Deta, InspireCloud, CloudBase, LeanCloud.

Ź€į“€Ź 5 Dec 15, 2022
šŸ‰ Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in Melon

?? Water Water is a micro-ORM + QueryBuilder designed to facilitate queries and operations on PostgreSQL databases designed to work in MelonRuntime In

Melon Runtime 22 Aug 6, 2022
A CRUD implementation using sequelize, mySQL, NODEJS, Express, JWT and other technologies.

A ideia do projeto Ć© simular o funcionamento do backend de um blog atravĆ©s da implementaĆ§Ć£o de uma aplicaĆ§Ć£o em Node.js usando o pacote sequelize para

Vinicius Savordelli 6 May 11, 2022
RESTful API using Hapi NodeJs Framework. This app is project from Dicoding Couses, Belajar Membuat Aplikasi Back-end untuk Pemula

RESTful API using Hapi NodeJs Framework. This app is project from Dicoding Couses, Belajar Membuat Aplikasi Back-end untuk Pemula

Muhammad Ferdian Iqbal 1 Jan 3, 2022
Lolis-rest - RESTful API for lolis-api

Lolis REST RESTful + Website for Lolis API. Introduction This is a RESTful API which will be used on Lolis API Website and Wrapper. This API uses Imgu

Waifu.sbs 3 Aug 11, 2022
A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Jean RodrĆ­guez 7 Sep 13, 2022
This is another Express + TypeScript + DDD (Domain Driven Design patterns) + IoC/DI (Inversion of control and Dependency injection) + Primsa ORM + API REST boilerplate.

Express-TS-DDD REST API This is another Express + TypeScript + DDD (Domain Driven Design patterns) + IoC/DI (Inversion of control and Dependency injec

J.D. 6 Nov 3, 2022
A Roblox OpenCloud API wrapper for Deno (and NodeJS) written in TypeScript.

Active Development This module is currently in active development. Nothing is going to stay consistent as it reaches a stable release. Dynablox Docs |

null 12 Oct 28, 2022
Simple WhatsApp Gateway, Built Using Baileys, Express, Sequelize, and Mazer

WhatsApp - Gateway Simple WhatsApp Gateway, Built Using Baileys, Express, Sequelize + Mazer Installation Requirements Node.js Git VS Code or Any Text

Zekais 40 Dec 30, 2022