Update server/client configs

This commit is contained in:
Barry Low committed 2018-10-12 09:50:13 -07:00
1 parent b2b911deae
commit a0fb1b133c
6 files changed
+41 -10

No files matched your search

+10 -5
View File
@@ -1,9 +1,9 @@
version: '3'
services:
api:
image: advancedalgosteamsmodule/teammodule-api:v5
node:
image: image: advancedalgosteamsmodule/teammodule-api:v6
env_file: ./.env
container_name: aateamapi-imagetest
container_name: aateamapi
tty: true
stdin_open: true
volumes:
@@ -12,5 +12,10 @@ services:
working_dir: /var/www/app
restart: always
command: node -r dotenv/config src/index.js
ports:
- "4001:4001"
expose:
- 4001
network_mode: webproxy
networks:
default:
external:
name: webproxy
+16
View File
@@ -0,0 +1,16 @@
version: '3'
services:
api:
image: advancedalgosteamsmodule/teammodule-api:v6
env_file: ./.env
container_name: aateamapi-imagetest
tty: true
stdin_open: true
volumes:
- ./:/var/www/app
- /var/www/app/node_modules
working_dir: /var/www/app
restart: always
command: node -r dotenv/config src/index.js
ports:
- "4001:4001"
+12 -2
View File
@@ -271,6 +271,7 @@ server.express.use(
server.express.post(server.options.endpoint, (req, res, done) => getUser(req, res, done, db))
/*
let whitelist = [
'http://localhost:3000',
'http://localhost:3001',
@@ -278,6 +279,7 @@ let whitelist = [
'http://localhost:4000',
'http://localhost:4002',
'http://localhost:1337',
'http://localhost:4100',
'https://teams.advancedalgos.net',
'https://users.advancedalgos.net',
'https://users-api.advancedalgos.net',
@@ -296,13 +298,21 @@ const corsOptionsDelegate = (req, callback) => {
}
callback(null, corsOptions) // callback expects two parameters: error and options
}
*/
const corsOptions = {
"origin": "*",
"methods": "GET,HEAD,PUT,PATCH,POST,DELETE",
"preflightContinue": false,
"optionsSuccessStatus": 204
}
const options = {
port: 4001,
cors: corsOptionsDelegate,
cors: corsOptions,
endpoint: '/graphql',
subscriptions: '/graphql',
playground: '/playground'
playground: '/graphiql'
}
server.start(options, () => console.log(`Server is running on http://localhost:4001${server.options.endpoint}`))
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@advancedalgos/teams-client",
"version": "0.0.17",
"version": "0.0.18",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@advancedalgos/teams-client",
"version": "0.0.17",
"version": "0.0.18",
"description": "Advanced Algos Team client-side web app",
"main": "src/index.js",
"scripts": {
+1 -1
View File
@@ -14,7 +14,7 @@ import Overview from './Overview'
import ManageTeams from './ManageTeams'
import FinancialBeings from './FinancialBeings'
import TeamMembers from './TeamMembers'
import Settings from './Settings'
import Settings from './settings'
const drawerWidth = 240