Skip to content

Commit

Permalink
Adds boilerplate for upcoming enricher component.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Prickett committed Feb 16, 2023
1 parent 873f53c commit 3cabada
Show file tree
Hide file tree
Showing 5 changed files with 367 additions and 0 deletions.
3 changes: 3 additions & 0 deletions enricher/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enricher Component

TODO README...
15 changes: 15 additions & 0 deletions enricher/enricher.js
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!!!!
4 changes: 4 additions & 0 deletions enricher/env.example
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
317 changes: 317 additions & 0 deletions enricher/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions enricher/package.json
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"
}
}

0 comments on commit 3cabada

Please sign in to comment.