Skip to content

Commit 2e88d67

Browse files
authored
Add files via upload
1 parent 95012dc commit 2e88d67

13 files changed

+933
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM node:12-stretch
2+
COPY . .
3+
RUN npm i
4+
EXPOSE 8000
5+
CMD node .

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# MagicCap API v3
2+
A rewrite of the MagicCap API, using Express to handle the serving of traffic. This is a drop-in replacement for API v2. The Kubernetes deployment is [here](https://github.com/JakeMakesStuff/Kube-Deployments/tree/master/magiccap-api).

app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const express = require("express")
2+
const expressWsImport = require("express-ws")
3+
4+
const expressWs = expressWsImport(express())
5+
const app = expressWs.app
6+
7+
module.exports = { expressWs, app }

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(async() => {
2+
const { app } = require("./app")
3+
4+
const Sentry = require("@sentry/node")
5+
Sentry.init({
6+
dsn: process.env.SENTRY_DSN,
7+
})
8+
9+
await require("./rethink_connection").connect()
10+
require("./routes")
11+
12+
app.listen(8000, "0.0.0.0", () => console.log("Listening on port 8000."))
13+
})()

0 commit comments

Comments
 (0)