mirror of
https://github.com/ThisIsBenny/wishlist-app.git
synced 2025-06-07 05:57:41 +00:00
commit
a0f294ad44
4 changed files with 11 additions and 6 deletions
|
@ -4,7 +4,8 @@ FROM node:lts as builder
|
|||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json /app/
|
||||
RUN npm ci --ignore-scripts
|
||||
RUN npm set-script prepare ""
|
||||
RUN npm ci
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
|
@ -25,7 +26,8 @@ RUN mkdir data
|
|||
|
||||
COPY package.json package-lock.json /app/
|
||||
COPY ./prisma /app/prisma
|
||||
RUN npm ci --ignore-scripts
|
||||
RUN npm set-script prepare ""
|
||||
RUN npm ci
|
||||
COPY --from=builder /app/dist /app
|
||||
|
||||
EXPOSE 5000
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "wishlist",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"dependencies": {
|
||||
"@prisma/client": "^3.8.1",
|
||||
"axios": "^0.25.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"scripts": {
|
||||
"dev": "concurrently --kill-others \"npm run dev:frontend\" \"npm run dev:backend\"",
|
||||
"dev:frontend": "vite",
|
||||
|
|
|
@ -16,7 +16,10 @@ export default async (opts: FastifyContextConfig = {}) => {
|
|||
})
|
||||
|
||||
await app.register(cors, {
|
||||
origin: true,
|
||||
origin:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? /https?:\/\/localhost(:\d+)?/
|
||||
: false,
|
||||
})
|
||||
|
||||
await app.register(compress)
|
||||
|
|
Loading…
Add table
Reference in a new issue