Skip to content

Commit afbcfd9

Browse files
authored
Use pnpm workspaces for api dependencies (#18)
Move API dependencies to separate package.json
1 parent fdf69fd commit afbcfd9

9 files changed

+2500
-658
lines changed

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules/
2-
bower_components/
32
.env

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules/
2-
bower_components/
32
coverage/
43
dist/
54
docs/

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
shared-workspace-lockfile=false

Dockerfile

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
FROM node:22
22

3-
WORKDIR /financier
43
RUN corepack enable
5-
RUN pnpm install express@^4.17.3 nocache@^4.0.0 uuid@^11.0.0 helmet@^8.0.0 cheerio@^1.0.0
4+
5+
WORKDIR /financier
66

77
ADD ./dist /financier/dist
88
ADD ./docs /financier/docs
99
ADD ./api /financier/api
10-
ADD ./package.json /financier/package.json
1110

1211
WORKDIR /financier/api
1312

14-
EXPOSE 8080
13+
RUN pnpm install --prod --frozen-lockfile
1514

16-
# RUN apt-get install -y git-core
15+
EXPOSE 8080
1716

1817
CMD ["node", "./index.js"]

api/package.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "financier-api",
3+
"private": "true",
4+
"type": "module",
5+
"version": "1.0.0",
6+
"description": "Financier production API",
7+
"main": "index.js",
8+
"keywords": [],
9+
"author": "",
10+
"license": "MIT",
11+
"dependencies": {
12+
"api": "^6.1.2",
13+
"cheerio": "^1.0.0",
14+
"express": "^4.21.1",
15+
"helmet": "^8.0.0",
16+
"nocache": "^4.0.0",
17+
"uuid": "^11.0.2"
18+
}
19+
}

0 commit comments

Comments
 (0)