Skip to content

Commit

Permalink
chore: npm install -> npm ci in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
minenwerfer committed Jun 12, 2024
1 parent ffd215d commit 1235b28
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM node:20
WORKDIR /opt/application/api
COPY . .

RUN npm install
RUN npm ci
RUN npm run build

CMD npm run build:post \
Expand Down
13 changes: 11 additions & 2 deletions api/src/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import { createRouter } from 'aeria'
import { createRouter, Result } from 'aeria'

export const router = createRouter()

router.GET('/test', () => {
router.GET('/test', async (context) => {
const { error, result } = await context.collections.person.functions.get({
filters: {}
})

if( error ) {
return Result.error(error)
}

return {
message: 'Hello, world!',
result,
}
})

2 changes: 1 addition & 1 deletion web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:20
WORKDIR /opt/application/web
COPY . .

RUN npm install
RUN npm ci
CMD cp ../api/node_modules/aeria-sdk/dist/runtime.* node_modules/aeria-sdk/dist \
&& npm run build \
&& rm -rf /var/www/html/* \
Expand Down

0 comments on commit 1235b28

Please sign in to comment.