Skip to content

🧪 Proof of Concept for a RESTful API made with Node.js 20 (LTS) and Express.js 4 in TypeScript

License

Notifications You must be signed in to change notification settings

nanotaboada/ts-node-samples-express-restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 RESTful API with Node.js and Express.js in TypeScript

Status

Node.js CI CodeFactor Maintainability Codacy Badge codecov Known Vulnerabilities

Manifesto

"Nobody should start to undertake a large project. You start with a small trivial project, and you should never expect it to get large. If you do, you'll just overdesign and generally think it is more important than it likely is at that stage. Or worse, you might be scared away by the sheer size of the work you envision. So start small, and think about the details. Don't think about some big picture and fancy design. If it doesn't solve some fairly immediate need, it's almost certainly over-designed. And don't expect people to jump in and help you. That's not how these things work. You need to get something half-way useful first, and then others will say "hey, that almost works for me", and they'll get involved in the project." — Linus Torvalds

About

Proof of Concept for a RESTful API made with Node.js 20.x LTS and Express.js 4 in TypeScript.

Structure

The following is a simplified dependency diagram of modules and main libraries:

Dependency Diagram

Install

npm install

Run

npm run dev

By default the application server will start as follows:

> ts-node-samples-express-restful@1.0.0 dev
> nodemon

[nodemon] 3.1.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/**/*
[nodemon] watching extensions: ts
[nodemon] starting `ts-node ./src/server.ts`
[server]: Server is running at http://localhost:9000

You can change the port by setting the PORT environment variable in the .env file.

# /.env
PORT=9999

Documentation

http://localhost:9000/swagger/

API Documentation

Credits

The solution has been coded using Visual Studio Code.

Terms

All trademarks, registered trademarks, service marks, product names, company names, or logos mentioned on this repository are the property of their respective owners. All usage of such terms herein is for identification purposes only and constitutes neither an endorsement nor a recommendation of those items. Furthermore, the use of such terms is intended to be for educational and informational purposes only.