https://github.com/lucasdants/nodejs-devradar
DevRadar is a project developed during the Semana Omnistack presented by Rockeseat. This project is a way to find near devs by techs.
https://github.com/lucasdants/nodejs-devradar
axios cors express mongoose socketio typescript
Last synced: about 2 months ago
JSON representation
DevRadar is a project developed during the Semana Omnistack presented by Rockeseat. This project is a way to find near devs by techs.
- Host: GitHub
- URL: https://github.com/lucasdants/nodejs-devradar
- Owner: LucasDants
- License: mit
- Created: 2021-03-04T17:03:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-18T22:13:36.000Z (over 5 years ago)
- Last Synced: 2025-03-14T09:41:31.039Z (over 1 year ago)
- Topics: axios, cors, express, mongoose, socketio, typescript
- Language: TypeScript
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DevRadar API
DevRadar is a Restfull API of DevRadar Web and DevRadar Mobile
:memo:About
DevRadar API is a project developed during the Semana Omnistack 10 presented by Rockeseat.
WEB: DevRadar Web
API: DevRadar Mobile
:rocket: Getting started
```bash
# Clone this repository
$ git clone https://github.com/Luksdantas/NodeJS-DevRadar.git
# Access the project folder cmd/terminal
$ cd NodeJS-DevRadar
# install the dependencies
$ npm install
# Run the application in development mode
$ npm run dev
# The application will open on the port: 3333 - go to http://localhost:3333
```
🛠 DevRadar API
Insomnia document
POST Create Dev
Request
`POST /devs`
```
{
"github_username": "Luksdantas",
"techs": "ReactJs, Node, ReactNative",
"latitude": 0.1,
"longitude": 0.1
}
```
Response
```
{
"techs": [
"ReactJs",
"ReactNative",
"Node"
],
"_id": "604a3418616cc11ee0ef6a88",
"github_username": "Luksdantas",
"name": "Luksdantas",
"avatar_url": "https://avatars.githubusercontent.com/u/55062200?v=4",
"bio": "\r\n do {\r\n beBetterEveryDay()\r\n} while (true);\r\n \r\n\r\n\r\n\r\n",
"location": {
"coordinates": [
0.1,
0.1
],
"_id": "604a3418616cc11ee0ef6a89",
"type": "Point"
},
"__v": 0
}
```
GET Devs
Request
`GET /devs`
Response
```
[
{
"techs": [
"ReactJs",
"ReactNative",
"Node"
],
"_id": "604a3418616cc11ee0ef6a88",
"github_username": "Luksdantas",
"name": "Luksdantas",
"avatar_url": "https://avatars.githubusercontent.com/u/55062200?v=4",
"bio": "\r\n do {\r\n beBetterEveryDay()\r\n} while (true);\r\n \r\n\r\n\r\n\r\n",
"location": {
"coordinates": [
0.1,
0.1
],
"_id": "604a3418616cc11ee0ef6a89",
"type": "Point"
},
"__v": 0
}
]
```
PUT Dev
Request
`PUT /devs/:github_username`
```
{
"techs": "ReactJs, React Native, Node, Typescript",
"latitude": 0.2,
"longitude": 0.2
}
```
Response
```
{
"n": 1,
"nModified": 1,
"opTime": {
"ts": "6938417867373150209",
"t": 4
},
"electionId": "7fffffff0000000000000004",
"ok": 1,
"$clusterTime": {
"clusterTime": "6938417867373150209",
"signature": {
"hash": "OKCWfoQPTczr//Fo2gA2u+GmOqo=",
"keyId": "6936447585485848579"
}
},
"operationTime": "6938417867373150209"
}
```
DELETE Dev
Request
`DELETE /devs/:github_username`
Response
```
{
"n": 1,
"opTime": {
"ts": "6938419130093535234",
"t": 4
},
"electionId": "7fffffff0000000000000004",
"ok": 1,
"$clusterTime": {
"clusterTime": "6938419130093535234",
"signature": {
"hash": "NzCG42AJYnHs+DgkSqBSuRBrCv8=",
"keyId": "6936447585485848579"
}
},
"operationTime": "6938419130093535234",
"deletedCount": 1
}
```
GET Search Near Devs
Request
`GET /search?latitude=lat&longitude=lon&techs=techsstring`
Response
```
{
"devs": [
{
"techs": [
"ReactJs",
"ReactNative",
"Node"
],
"_id": "604a37f3089b7319e81be47a",
"github_username": "Luksdantas",
"name": "Luksdantas",
"avatar_url": "https://avatars.githubusercontent.com/u/55062200?v=4",
"bio": "\r\n do {\r\n beBetterEveryDay()\r\n} while (true);\r\n \r\n\r\n\r\n\r\n",
"location": {
"coordinates": [
0.1,
0.1
],
"_id": "604a37f3089b7319e81be47b",
"type": "Point"
},
"__v": 0
}
]
}
```
:bookmark_tabs: License
Made with :heart: by Lucas Dantas 👋🏽 Get in Touch!