https://github.com/metalcamp/node-rest-api
Sample REST API written in Typescript
https://github.com/metalcamp/node-rest-api
express express-js expressjs jest jest-test nodejs nodejs-api rest-api typeorm typeorm-javascript typescript
Last synced: about 2 months ago
JSON representation
Sample REST API written in Typescript
- Host: GitHub
- URL: https://github.com/metalcamp/node-rest-api
- Owner: metalcamp
- Created: 2020-04-24T14:48:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T02:27:22.000Z (over 3 years ago)
- Last Synced: 2025-03-21T04:19:54.162Z (about 1 year ago)
- Topics: express, express-js, expressjs, jest, jest-test, nodejs, nodejs-api, rest-api, typeorm, typeorm-javascript, typescript
- Language: TypeScript
- Homepage:
- Size: 2.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Setup
Install dependencies
```bash
yarn install
```
Start postgres and redis
```bash
sudo docker-compose up -d postgres redis
```
## Run
Start server
```
yarn start
```
Start RSS parser / publish RSS content to channels
```
yarn start-rss
```
Start publish worker / redis listener
```
yarn start-publish
```
## Tests
Run all tests
```bash
yarn test
```
Run unit tests
```bash
yarn unit
```
Run integration tests
```bash
yarn integration
```
### TODO
* implement [winston](https://github.com/winstonjs/winston) logger
* implement client subscriber (client prints request body to console)
* support glob style pattern channel matching
* implement publish worker (worker publishes messages published to channel to its subscribers)
* setup and configure jest with ts-jest
* implement tests
* refactor error mechanism
* implement BZPOPMAX and replace redis.publish with redis.zset to avoid sending duplicate messages