Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thepatrickniyo/nestjs-socket-boiler-plate
Boiler plate code to implement websocket APIs intergrated with RESTfull APIs in nestjs, using vuejs as a demo client
https://github.com/thepatrickniyo/nestjs-socket-boiler-plate
nestjs rest-api vuejs websocket
Last synced: 11 days ago
JSON representation
Boiler plate code to implement websocket APIs intergrated with RESTfull APIs in nestjs, using vuejs as a demo client
- Host: GitHub
- URL: https://github.com/thepatrickniyo/nestjs-socket-boiler-plate
- Owner: thepatrickniyo
- License: mit
- Created: 2021-07-25T15:37:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-25T15:56:32.000Z (over 3 years ago)
- Last Synced: 2025-01-16T01:26:54.810Z (20 days ago)
- Topics: nestjs, rest-api, vuejs, websocket
- Language: TypeScript
- Homepage:
- Size: 173 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nestjs socket boiler plate
Alot of totorials talking about websocket apis in nestjs do not tacklle on using both restfull api with websocket api. I found no resource talking about this but I managed to make it.- What you need is to make your `gateway` injectable and inject it in a controller instead of injecting the usual service. The usual service will be consumed by the gateway.
- Refer to the boiler this boiler plate to check the implementation## Stacks
- Vuejs (Vuejs CDN) as a websocket client
- [insomenia](https://insomnia.rest/) / [postman](https://www.postman.com/) or any other REST api testing tool to test restfull api
- Nestjs## Requirements
- Nodejs
## Getting started
### Installing dependencies
- [X] clone the [repo](https://github.com/PatrickNiyogitare28/nestjs-socket-boiler-plate)
- [X] run `npm install` or `yarn install` to add dependencies### Starting the application
After installing the dependencies, you can run the application using one of the following commands.
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Testing the application
After starting the application, you should see our layout when visiting http://localhost:3000 in your browser. After opening the application in multiple browser windows, you can test the functionality.
You can also use RESTfull API testing tool like [insomenia](https://insomnia.rest/) or [postman](https://www.postman.com/) to test the functionality
## LICENSE
[MIT LICENSE](https://github.com/PatrickNiyogitare28/nestjs-socket-boiler-plate/blob/main/LICENSE)## Author
[email protected]