-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8507198
commit 0e51222
Showing
7 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "note-app-be", | ||
"name": "notes-app-be", | ||
"version": "1.0.0", | ||
"description": "", | ||
"description": "Notes App Express Backend", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test:system": "npx vitest **/system/*.spec.ts", | ||
|
@@ -18,7 +18,7 @@ | |
"prisma": "npx prisma migrate dev --name init", | ||
"seed": "npx ts-node prisma/seed.ts" | ||
}, | ||
"author": "", | ||
"author": "Dave Gordon<[email protected]>", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@types/cors": "2.8.17", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
build | ||
.dockerignore | ||
Dockerfile | ||
Dockerfile.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Use an official Node.js runtime as the base image | ||
FROM node:14 | ||
|
||
# Set the working directory in the Docker container | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install the app dependencies | ||
RUN npm install | ||
|
||
# Copy the app source code to the working directory | ||
COPY . . | ||
|
||
# Build the app | ||
RUN npm run build | ||
|
||
# Use an official lightweight Node.js runtime as the final base image | ||
FROM node:14-alpine | ||
|
||
# Set the working directory in the Docker container | ||
WORKDIR /usr/src/app | ||
|
||
# Install serve to serve the app | ||
RUN npm install -g serve | ||
|
||
# Copy the build output from the previous stage | ||
COPY --from=0 /usr/src/app/build . | ||
|
||
# Expose port 5000 for the app | ||
EXPOSE 3000 | ||
|
||
# Start the app | ||
CMD ["serve", "-s", ".", "-l", "3000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"name": "notes-app", | ||
"name": "notes-app-fe", | ||
"version": "1.0.0", | ||
"private": true, | ||
"description": "Notes App React Frontend", | ||
"author": "Dave Gordon<[email protected]>", | ||
"dependencies": { | ||
"@testing-library/react": "14.1.2", | ||
"@testing-library/user-event": "13.5.0", | ||
|
@@ -10,9 +11,9 @@ | |
"@types/react": "18.2.46", | ||
"@types/react-dom": "18.2.18", | ||
"axios": "1.6.5", | ||
"react": "^18.2.0", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"react-loader-spinner": "^6.1.6", | ||
"react-loader-spinner": "6.1.6", | ||
"react-scripts": "5.0.1", | ||
"typescript": "4.9.5", | ||
"undici": "6.2.1", | ||
|
@@ -23,7 +24,10 @@ | |
"build": "react-scripts build", | ||
"test": "vitest", | ||
"test:coverage": "vitest --coverage", | ||
"eject": "react-scripts eject" | ||
"eject": "react-scripts eject", | ||
"docker:build": "docker build -t notes-app-fe .", | ||
"docker:up": "docker run -p 3000:3000 notes-app-fe", | ||
"docker:down": "docker stop notes-app" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
|
@@ -44,7 +48,7 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"@mswjs/data": "^0.16.1", | ||
"@mswjs/data": "0.16.1", | ||
"@testing-library/jest-dom": "6.2.0", | ||
"@vitejs/plugin-react": "4.2.1", | ||
"@vitest/coverage-v8": "1.1.3", | ||
|