setup docker containers
This commit is contained in:
parent
3274d47c94
commit
13d9a24d63
22 changed files with 1593 additions and 745 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {Data} from "../../../../DataGatherer/src/shared/Data";
|
||||
import {Data} from "../../../../Shared/Data";
|
||||
import {createCanvas, Image} from "canvas";
|
||||
import fs from "fs";
|
||||
import mongoose from "mongoose";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import * as WebSocket from 'ws';
|
|||
import * as http from 'http';
|
||||
import cors from 'cors';
|
||||
import * as bodyParser from "body-parser";
|
||||
import {Data} from "../../../../DataGatherer/src/shared/Data";
|
||||
import {Data} from "../../../../Shared/Data";
|
||||
import parser from 'query-string-parser';
|
||||
import mongoose from "mongoose";
|
||||
import {DataSchema} from './models/Data';
|
||||
|
|
@ -16,7 +16,7 @@ export class PredictorWebService {
|
|||
private app: express.Application;
|
||||
private httpServer: http.Server;
|
||||
private wss: WebSocket.Server;
|
||||
private mongoEndpoint = 'mongodb://localhost:27017/predictorDatas';
|
||||
private mongoEndpoint = 'mongodb://ups_database:27017/predictorDatas';
|
||||
|
||||
private counter: number = 0;
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ export class PredictorWebService {
|
|||
this.portApi = portApi;
|
||||
this.portWebSocket = portWebSocket;
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.connect(this.mongoEndpoint, { useNewUrlParser: true },
|
||||
mongoose.connect(this.mongoEndpoint, { useNewUrlParser: true, useUnifiedTopology: true },
|
||||
err => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { PredictorWebService } from "./PredictorWebService";
|
||||
|
||||
function main() {
|
||||
const predictorWebService = new PredictorWebService('/', 4000, 4100);
|
||||
const predictorWebService = new PredictorWebService('/', 8002, 8001);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import mongoose from "mongoose";
|
||||
import {Data} from "../../../../../DataGatherer/src/shared/Data";
|
||||
import {Data} from "../../../../../Shared/Data";
|
||||
import {Schema} from "mongoose";
|
||||
|
||||
const DataSchema_:Schema = new Schema(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue