Skip to content

Commit

Permalink
upgrade project to modern stack
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelghost committed Apr 26, 2024
1 parent e48ba59 commit 0bbe88c
Show file tree
Hide file tree
Showing 15 changed files with 1,315 additions and 16,184 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/coverage

# production
/build
/dist

# misc
.DS_Store
Expand Down
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
FROM node:14-alpine as builder
FROM node:20-alpine as builder

WORKDIR /usr/local/src/calculator

COPY . .

RUN npm i && npm run build

FROM node:14-alpine
FROM caddy:2-alpine

WORKDIR /var/www/html
WORKDIR /usr/share/caddy

RUN npm i -g serve

COPY --from=builder /usr/local/src/calculator/build .

CMD ["serve", "-n", "-s", "/var/www/html"]
COPY --from=builder /usr/local/src/calculator/dist .
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
A small calculator website made with React.js

Run `npm run start` to initialise it in development, or `npm run build` to get the production files.

## Purpose

This is one of my early, quick portfolio projects. I'm still keeping it around to see just how long I can maintain a project for after creating it on 4 April 2018. I'm updating this readme just after the 6th anniversary.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Calculator</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.jsx"></script>
</body>
</html>
Loading

0 comments on commit 0bbe88c

Please sign in to comment.