This commit is contained in:
2021-08-29 20:18:54 +09:00
parent 67c75578e5
commit a823fafc09
3 changed files with 7 additions and 6 deletions

View File

@@ -5,13 +5,13 @@ COPY . .
RUN ["./build_script.sh"]
FROM node:14
FROM arm32v7/node:14
WORKDIR /usr/src/app
COPY --from=0 /tmp/build .
RUN apt-get update && apt install mariadb-client -y
RUN npm install
EXPOSE 8080
EXPOSE 4000
CMD [ "node", "server/index.js" ]

View File

@@ -4,7 +4,7 @@
"description": "",
"main": "src/index.ts",
"scripts": {
"start": "ts-node-dev --respawn --transpileOnly ./src/index.ts",
"start": "ts-node-dev --poll --respawn --transpile-only ./src/index.ts",
"build": "tsc --resolveJsonModule",
"test": "ts-node-dev src/test.ts",
"lint": "tslint -c tslint.json -p tsconfig.json"

View File

@@ -10,7 +10,7 @@ import { IJankenSelect, IJankenResult } from './models/message';
import { IRoom } from './models';
dotenv.config();
const port: number = 8080;
const port: number = 4000;
const app: express.Express = express();
const httpServer: http.Server = http.createServer(app);
const io: socketIo.Server = socketIo(httpServer);
@@ -24,7 +24,8 @@ const connection = mysql.createPool({
host: process.env.DB_ENDPOINT,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: 'catherine_league'
database: 'catherine_league',
charset: 'utf8mb4'
});
connection.query(
`SELECT id, tournament_key