More updates
This commit is contained in:
parent
9e268b9e03
commit
eabeb2c1a1
13
Dockerfile
13
Dockerfile
@ -1,13 +0,0 @@
|
|||||||
FROM node:12-alpine
|
|
||||||
|
|
||||||
WORKDIR /excalidraw-room
|
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN yarn
|
|
||||||
|
|
||||||
COPY tsconfig.json ./
|
|
||||||
COPY src ./src
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
CMD ["yarn", "start"]
|
|
11
app.yaml
11
app.yaml
@ -1 +1,12 @@
|
|||||||
runtime: nodejs14
|
runtime: nodejs14
|
||||||
|
env: flex
|
||||||
|
|
||||||
|
# https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
|
||||||
|
manual_scaling:
|
||||||
|
instances: 1
|
||||||
|
resources:
|
||||||
|
cpu: 1
|
||||||
|
memory_gb: 0.5
|
||||||
|
disk_size_gb: 10
|
||||||
|
network:
|
||||||
|
session_affinity: true
|
||||||
|
@ -22,10 +22,10 @@ server.listen(port, () => {
|
|||||||
|
|
||||||
const io = socketIO(server, {
|
const io = socketIO(server, {
|
||||||
handlePreflightRequest: function (req, res) {
|
handlePreflightRequest: function (req, res) {
|
||||||
|
console.log('req', req.header);
|
||||||
var headers = {
|
var headers = {
|
||||||
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
||||||
"Access-Control-Allow-Origin":
|
"Access-Control-Allow-Origin": "*",
|
||||||
(req.header && req.header.origin) || "https://excalidraw.com",
|
|
||||||
"Access-Control-Allow-Credentials": true,
|
"Access-Control-Allow-Credentials": true,
|
||||||
};
|
};
|
||||||
res.writeHead(200, headers);
|
res.writeHead(200, headers);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user