Skip to content

Commit

Permalink
wip: selecting data
Browse files Browse the repository at this point in the history
  • Loading branch information
VilemRaska committed Jan 26, 2025
1 parent 9c01f34 commit fd7b1d0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
14 changes: 10 additions & 4 deletions GAPP/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

## Preparations

1. You need NodeJS version `v22.13.1` or newer
1. You need to use NodeJS version `v22.13.1` or newer or use `nvm use` to switch to the correct version.

2. Instal dependencies by running `npm i`
2. Instal dependencies by running `npm install`

3. To develop dashboard, run `npm run dashboard:dev`
3. Run dependencies by `docker compose up -d`.

4. To develop server, run `npm run server:dev`
4. To develop dashboard, run `npm run dashboard:dev`

5. To develop server, run `npm run server:dev`

## API Documentation

Swagger is available at [http://localhost:3000/docs](http://localhost:3000/docs).

---

Expand Down
7 changes: 1 addition & 6 deletions GAPP/apps/gapp-server/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ export const app = async (fastify: FastifyInstance, opts: AppOptions) => {
'/ping',
{
schema: {
description: 'Ping route',
response: {
200: {
type: 'string',
},
},
hide: true,
},
},
() => `pong\n\n${new Date().toString()}`
Expand Down
5 changes: 4 additions & 1 deletion GAPP/apps/gapp-server/src/controllers/cars.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const carsController: FastifyPluginAsyncTypebox = async (fastify) => {
schema: {
summary: 'Get cars positions',
description: 'Get latest location for all registered cars.',
tags: ['cars'],
},
},
async (req, rep) => {
Expand All @@ -20,7 +21,9 @@ export const carsController: FastifyPluginAsyncTypebox = async (fastify) => {
'/status',
{
schema: {
summary: 'Uploads car position to sondehub amateur.',
tags: ['cars'],
summary: 'Endpoint for car position',
description: 'Received data are stored in InfluxDB and forwarded to SondeHub.',
querystring: Q_Callsign,
body: B_CarStatus,
},
Expand Down
3 changes: 2 additions & 1 deletion GAPP/apps/gapp-server/src/controllers/sondes.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export const sondesController: FastifyPluginAsyncTypebox = async (fastify) => {
'/ttn',
{
schema: {
tags: ['sondes'],
summary: 'TTN webhook',
description: 'Endpoint for receiving telemetry data from TTN',
description: 'Endpoint for receiving telemetry data from TheThingsNetwork.',
body: B_SondeTtnTelemetry,
},
},
Expand Down

0 comments on commit fd7b1d0

Please sign in to comment.