-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds boilerplate for upcoming enricher component.
- Loading branch information
Simon Prickett
committed
Feb 16, 2023
1 parent
873f53c
commit 3cabada
Showing
5 changed files
with
367 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Enricher Component | ||
|
||
TODO README... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as dotenv from 'dotenv'; | ||
import { createClient } from 'redis'; | ||
|
||
dotenv.config(); | ||
|
||
const REDIS_URL = process.env.REDIS_URL || 'redis:https://127.0.0.1:6379'; | ||
const FLIGHTAWARE_API_KEY = process.env.FLIGHTAWARE_API_KEY; | ||
|
||
const redisClient = createClient({ | ||
url: REDIS_URL | ||
}); | ||
|
||
await redisClient.connect(); | ||
|
||
// TODO do something!!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Example env file for enricher. Copy to .env before using. | ||
# DO NOT COMMIT THE .env FILE TO SOURCE CONTROL! | ||
REDIS_URL=redis:https://127.0.0.1:6379/ | ||
FLIGHTAWARE_API_KEY=sssssssh |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "enricher", | ||
"version": "0.0.1", | ||
"description": "Data enricher component for the local aircraft tracker Redis project.", | ||
"main": "enricher.js", | ||
"scripts": { | ||
"start": "node enricher.js" | ||
}, | ||
"type": "module", | ||
"author": "Simon Prickett", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/simonprickett/local-aircraft-tracker.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/simonprickett/local-aircraft-tracker/issues" | ||
}, | ||
"homepage": "https://github.com/simonprickett/local-aircraft-tracker#readme", | ||
"engines": { | ||
"node": ">= 14.5.0" | ||
}, | ||
"dependencies": { | ||
"dotenv": "^16.0.3", | ||
"node-fetch": "^3.3.0", | ||
"redis": "^4.6.4" | ||
} | ||
} |