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
FROM node:10-alpine | |
WORKDIR /cloudl-server | |
COPY package.json ./ | |
RUN npm install | |
COPY . . |
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
// importing dependencies | |
const express = require('express'); | |
const bodyParser = require("body-parser"); | |
const mongoose = require("mongoose"); | |
const cors = require('cors'); | |
const socketIO = require('socket.io'); | |
// expressjs | |
const app = express(); |
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
// importing dependencies | |
const express = require('express'); | |
const bodyParser = require("body-parser"); | |
const mongoose = require("mongoose"); | |
const cors = require('cors'); | |
const socketIO = require('socket.io'); | |
const http = require('http'); | |
// expressjs | |
const app = express(); |
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
mongoose | |
.connect( | |
`mongodb://mongodb-service/cloudl`, { | |
useNewUrlParser: true, | |
useUnifiedTopology: true | |
}) | |
.then(() => console.log("MongoDB successfully connected")) | |
.catch(err => console.log(err)); |
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
const server = http.createServer(app); | |
const io = socketIO(server, { | |
path: '/socket/' | |
}); | |
let sockets = {}; | |
let python_socket; | |
io.on('connection', socket => { | |
console.log('New client connected!'); |
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
const app = express(); | |
app.use( | |
bodyParser.urlencoded({ | |
extended: false | |
}) | |
); | |
app.use(bodyParser.json()); | |
app.use(cors()); |
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
const express = require('express'); | |
const bodyParser = require("body-parser"); | |
const mongoose = require("mongoose"); | |
const cors = require('cors'); | |
const socketIO = require('socket.io'); | |
const http = require('http'); |
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
import socketIOClient from 'socket.io-client'; | |
let socket = socketIOClient('/', {path: '/socket/', transports: ['websocket', 'polling', 'flashsocket']}); | |
export default socket; |
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
import axios from "axios"; | |
import setAuthToken from "../utils/setAuthToken"; | |
import jwt_decode from "jwt-decode"; | |
import { | |
GET_ERRORS, | |
SET_CURRENT_USER, | |
USER_LOADING | |
} from "./types"; | |
// Register User |
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
49087820_0_461228320225084868 | |
0 1 2 3 4 5 | |
0 Country Currency Alphabetic code Numeric code Symbol Subdivision | |
1 Gabon CFA Franc BEAC XAF 950 CFAF 100 centimes | |
2 Gambia Dalasi GMD 270 D 100 butut | |
3 Georgia Lari GEL 981 100 tetri | |
4 Germany Euro EUR 978 100 euro-cents | |
0 : predicted = http://dbpedia.org/ontology/Country | actual = http://dbpedia.org/ontology/usingCountry | |
1 : predicted = http://dbpedia.org/ontology/currency | actual = http://dbpedia.org/ontology/Currency |
NewerOlder