Skip to content

Commit

Permalink
refactor: move to fastify and cut down dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettjay committed Apr 24, 2024
1 parent 17c66c3 commit 9f1bcc4
Show file tree
Hide file tree
Showing 8 changed files with 2,271 additions and 5,557 deletions.
4 changes: 2 additions & 2 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ WORKDIR /usr/app
COPY package*.json ./
RUN npm ci --omit=dev

COPY app.js server.js ./
COPY index.js server.js ./

ENV NODE_ENV='production'
USER node
EXPOSE 8080
CMD [ "node", "server.js" ]
CMD [ "node", "index.js" ]
39 changes: 0 additions & 39 deletions src/app.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/app.test.js

This file was deleted.

14 changes: 14 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { server } from './server.js'

async function run () {
const app = await server()

await app.listen({
host: '0.0.0.0',
port: 8080
})
}

run()
.then(r => {})
.catch(err => console.log({ err }, 'Error starting app'))
Loading

0 comments on commit 9f1bcc4

Please sign in to comment.