Skip to content

Commit

Permalink
Add feedme-viewer, a next.js site for viewing fixture information.
Browse files Browse the repository at this point in the history
  • Loading branch information
watsom27 committed May 14, 2023
1 parent b144ab8 commit 6b09d1c
Show file tree
Hide file tree
Showing 29 changed files with 1,570 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.consumer
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN npm ci

ENV LOG_LEVEL=warn

ENV NOSQL_CONNECTION_STRING=mongodb://mongodb:27017
ENV NOSQL_CONNECTION_STRING=mongodb://mongo:27017
ENV NOSQL_DB_NAME=FeedMe

ENV RABBITMQ_URL=amqp://rabbitmq:rabbitmq@rabbitmq/feedme
Expand Down
8 changes: 4 additions & 4 deletions consumer/src/mongoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Collection, MongoClient } from "mongodb";
import { EventMessage, MarketMessage, Message, MessageType, Operation, OutcomeMessage } from "../../library/src";
import { exhaustive } from "./exhaustive";

const FIXTURES_COLLECTION = "Fixtures";
export const FIXTURES_COLLECTION = "Fixtures";

interface EventDocument {
export interface EventDocument {
eventId: string;
category: string;
subCategory: string;
Expand All @@ -17,15 +17,15 @@ interface EventDocument {
outcomes: OutcomeDocument[];
}

interface MarketDocument {
export interface MarketDocument {
eventId: string;
marketId: string;
name: string;
displayed: boolean;
suspended: boolean;
}

interface OutcomeDocument {
export interface OutcomeDocument {
marketId: string;
outcomeId: string;
name: string;
Expand Down
2 changes: 1 addition & 1 deletion consumer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"isolatedModules": true,
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"] // this mapping is relative to "baseUrl"
"~/*": ["./src/*"]
}
}
}
18 changes: 10 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3'
services:
mongodb:
mongo:
image: mongo
ports:
- "27017:27017"
Expand All @@ -9,13 +9,15 @@ services:
networks:
- feedme-net

# mongo_ui:
# image: mongo-express
# ports:
# - "8081:8081"
# depends_on:
# rabbitmq:
# condition: service_healthy
mongo_ui:
image: mongo-express
ports:
- "8081:8081"
networks:
- feedme-net
depends_on:
rabbitmq:
condition: service_healthy

rabbitmq:
image: rabbitmq:3-management
Expand Down
2 changes: 2 additions & 0 deletions feedme-viewer/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NOSQL_CONNECTION_STRING=mongodb://localhost:27017
NOSQL_DB_NAME=FeedMe
35 changes: 35 additions & 0 deletions feedme-viewer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 6 additions & 0 deletions feedme-viewer/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
Loading

0 comments on commit 6b09d1c

Please sign in to comment.