https://github.com/nanotaboada/ts-node-samples-express-restful
🧪 Proof of Concept for a RESTful API made with Node.js 20 (LTS), Express.js 4 in TypeScript
https://github.com/nanotaboada/ts-node-samples-express-restful
express-js expressjs node-js nodejs proof-of-concept rest-api restful-api samples sqlite typescript
Last synced: 10 months ago
JSON representation
🧪 Proof of Concept for a RESTful API made with Node.js 20 (LTS), Express.js 4 in TypeScript
- Host: GitHub
- URL: https://github.com/nanotaboada/ts-node-samples-express-restful
- Owner: nanotaboada
- License: mit
- Created: 2024-03-30T04:03:29.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T02:00:15.000Z (almost 2 years ago)
- Last Synced: 2024-04-13T21:45:35.910Z (almost 2 years ago)
- Topics: express-js, expressjs, node-js, nodejs, proof-of-concept, rest-api, restful-api, samples, sqlite, typescript
- Language: TypeScript
- Homepage:
- Size: 584 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧪 RESTful API with Node.js and Express.js in TypeScript
## Status
[](https://github.com/nanotaboada/ts-node-samples-express-restful/actions/workflows/node.js.yml)
[](https://sonarcloud.io/summary/new_code?id=nanotaboada_ts-node-samples-express-restful)
[](https://app.codacy.com/gh/nanotaboada/ts-node-samples-express-restful/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://codecov.io/gh/nanotaboada/ts-node-samples-express-restful)
[](https://www.codefactor.io/repository/github/nanotaboada/ts-node-samples-express-restful)
[](https://codebeat.co/projects/github-com-nanotaboada-ts-node-samples-express-restful-master)
## 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](https://nodejs.org/) [LTS/Jod](https://nodejs.org/en/blog/release/v22.11.0) and [Express.js](https://expressjs.com/) 4 in [TypeScript](https://www.typescriptlang.org/).
## Structure
The following is a simplified dependency diagram of modules and main libraries:

## Install
```console
npm install
```
## Run
```console
npm run dev
```
By default the application server will start as follows:
```console
> ts-node-samples-express-restful@1.0.0 dev
> nodemon
[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.
```console
# /.env
PORT=9999
```
## Documentation
```console
http://localhost:9000/swagger/
```

## Credits
The solution has been coded using [Visual Studio Code](https://code.visualstudio.com/).
## 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.