Migrating messages locally into back and front
This commit is contained in:
parent
b4f971c501
commit
d7209d8864
18 changed files with 46 additions and 14 deletions
|
@ -6,7 +6,7 @@ RUN yarn install && yarn proto
|
|||
FROM thecodingmachine/nodejs:12
|
||||
|
||||
COPY --chown=docker:docker back .
|
||||
COPY --from=builder --chown=docker:docker /var/www/messages /var/www/messages
|
||||
COPY --from=builder --chown=docker:docker /var/www/messages/generated /var/www/html/src/Messages/generated
|
||||
RUN yarn install
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
"body-parser": "^1.19.0",
|
||||
"express": "^4.17.1",
|
||||
"generic-type-guard": "^3.2.0",
|
||||
"google-protobuf": "^3.13.0",
|
||||
"http-status-codes": "^1.4.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"prom-client": "^12.0.0",
|
||||
|
@ -50,6 +51,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.4",
|
||||
"@types/google-protobuf": "^3.7.3",
|
||||
"@types/http-status-codes": "^1.2.0",
|
||||
"@types/jasmine": "^3.5.10",
|
||||
"@types/jsonwebtoken": "^8.3.8",
|
||||
|
|
|
@ -28,8 +28,8 @@ import {
|
|||
SubMessage,
|
||||
UserMovedMessage,
|
||||
BatchMessage, GroupUpdateMessage, PointMessage, GroupDeleteMessage
|
||||
} from "../../../messages/generated/messages_pb";
|
||||
import {UserMovesMessage} from "../../../messages/generated/messages_pb";
|
||||
} from "../Messages/generated/messages_pb";
|
||||
import {UserMovesMessage} from "../Messages/generated/messages_pb";
|
||||
import Direction = PositionMessage.Direction;
|
||||
import {ProtobufUtils} from "../Model/Websocket/ProtobufUtils";
|
||||
|
||||
|
|
1
back/src/Messages/.gitignore
vendored
Normal file
1
back/src/Messages/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/generated/
|
|
@ -3,7 +3,7 @@ import {PointInterface} from "./PointInterface";
|
|||
import {Identificable} from "./Identificable";
|
||||
import {TokenInterface} from "../../Controller/AuthenticateController";
|
||||
import {ViewportInterface} from "_Model/Websocket/ViewportMessage";
|
||||
import {BatchMessage, SubMessage} from "../../../../messages/generated/messages_pb";
|
||||
import {BatchMessage, SubMessage} from "../../Messages/generated/messages_pb";
|
||||
|
||||
export interface ExSocketInterface extends Socket, Identificable {
|
||||
token: string;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {PointInterface} from "./PointInterface";
|
||||
import {PositionMessage} from "../../../../messages/generated/messages_pb";
|
||||
import {PositionMessage} from "../../Messages/generated/messages_pb";
|
||||
import {ExSocketInterface} from "_Model/Websocket/ExSocketInterface";
|
||||
import Direction = PositionMessage.Direction;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"downlevelIteration": true,
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||
"allowJs": true, /* Allow javascript files to be compiled. */
|
||||
// "checkJs": true, /* Report errors in .js files. */
|
||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
|
|
|
@ -57,6 +57,11 @@
|
|||
"@types/qs" "*"
|
||||
"@types/serve-static" "*"
|
||||
|
||||
"@types/google-protobuf@^3.7.3":
|
||||
version "3.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.7.3.tgz#429512e541bbd777f2c867692e6335ee08d1f6d4"
|
||||
integrity sha512-FRwj40euE2bYkG+0X5w2nEA8yAzgJRcEa7RBd0Gsdkb9/tPM2pctVVAvnOUTbcXo2VmIHPo0Ae94Gl9vRHfKzg==
|
||||
|
||||
"@types/http-status-codes@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/http-status-codes/-/http-status-codes-1.2.0.tgz#6e5244835aaf7164dd306f1d4d2dfdbb2159d909"
|
||||
|
@ -822,6 +827,11 @@ globals@^12.1.0:
|
|||
dependencies:
|
||||
type-fest "^0.8.1"
|
||||
|
||||
google-protobuf@^3.13.0:
|
||||
version "3.13.0"
|
||||
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.13.0.tgz#909c5983d75dd6101ed57c79e0528d000cdc3251"
|
||||
integrity sha512-ZIf3qfLFayVrPvAjeKKxO5FRF1/NwRxt6Dko+fWEMuHwHbZx8/fcaAao9b0wCM6kr8qeg2te8XTpyuvKuD9aKw==
|
||||
|
||||
graceful-fs@^4.1.2:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue