Skip to content

Commit 21f8e11

Browse files
Migrate coprocessor to typescript (#16)
What's Changing: - coprocessor code converted to typescript - package-lock.json updated at top level of mono-repo TODO: - update tests to use typescript if deemed necessary
1 parent 32e5768 commit 21f8e11

File tree

10 files changed

+1059
-83
lines changed

10 files changed

+1059
-83
lines changed

coprocessor/.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Ignore the compiled output.
2+
dist/
3+
4+
# TypeScript incremental compilation cache
5+
*.tsbuildinfo
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Coverage (from Jest)
15+
coverage/
16+
__temp
17+
18+
# JUnit Reports (used mainly in CircleCI)
19+
reports/
20+
junit.xml
21+
22+
# Node modules
23+
node_modules/
24+
25+
# Mac OS
26+
.DS_Store
27+
28+
# Intellij Configuration Files
29+
.idea/
30+
31+
generated-schema.graphql

coprocessor/Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
FROM node:18-alpine as node-build
1+
FROM node:22-bookworm-slim
22

3-
ENV NODE_ENV=production
3+
WORKDIR /usr/src/app
44

5-
WORKDIR /app
5+
COPY package.json .
6+
COPY package-lock.json .
67

7-
COPY package.json package-lock.json ./
8+
RUN npm install --no-save
89

9-
RUN npm install --production
10+
COPY src ./src
11+
COPY tsconfig.json .
1012

11-
COPY . .
13+
RUN npm run build:tsc
1214

13-
CMD node index.js
15+
EXPOSE 8081
16+
17+
CMD [ "node", "./dist/index.js" ]

coprocessor/index.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)