Skip to content

Commit 1637972

Browse files
committed
upgrade dependencies and clean up
1 parent 17d0d04 commit 1637972

16 files changed

+6253
-26919
lines changed

.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
PUBLIC_URL=.
2-
PORT=3002
1+
PORT=3002

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.15.0
1+
22.14.0

Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
FROM node:22-slim
2+
3+
# Create app directory
4+
WORKDIR /usr/src/app
5+
6+
COPY package*.json ./
7+
COPY tsconfig.json ./
8+
9+
RUN npm ci
10+
11+
COPY . .
12+
13+
RUN npm run build
14+
15+
RUN npm prune --production
16+
17+
EXPOSE 3000
18+
19+
CMD ["node", "build/src/index."]

Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Name of the Docker container
2+
DOCKER_IMAGE=node:22-slim
3+
include .env
4+
5+
# The current directory (mapped to the container)
6+
CURRENT_DIR=$(shell pwd)
7+
8+
.PHONY: clean
9+
clean:
10+
@echo "Clean"
11+
rm -rf build
12+
13+
.PHONY: build
14+
build:
15+
@echo "Create docker container"
16+
docker build -t ccn-coverage-vis .
17+
18+
# The target for development
19+
.PHONY: dev
20+
dev:
21+
docker run --rm -it \
22+
-v $(CURRENT_DIR):/app \
23+
-w /app \
24+
-p $(PORT):$(PORT) \
25+
$(DOCKER_IMAGE) /bin/bash

public/index.html renamed to index.html

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,25 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
10-
content="Web site created using create-react-app"
10+
content="Web site created using Vite"
1111
/>
1212
<link
1313
rel="stylesheet"
1414
href="https://unpkg.com/[email protected]/dist/leaflet.css"
1515
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
1616
crossorigin=""
1717
/>
18-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
18+
<link rel="apple-touch-icon" href="/logo192.png" />
1919
<!--
2020
manifest.json provides metadata used when your web app is installed on a
21-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
22-
-->
23-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
24-
<!--
25-
Notice the use of %PUBLIC_URL% in the tags above.
26-
It will be replaced with the URL of the `public` folder during the build.
27-
Only files inside the `public` folder can be referenced from the HTML.
28-
29-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
30-
work correctly both with client-side routing and a non-root public URL.
31-
Learn how to configure a non-root public URL by running `npm run build`.
21+
user's mobile device or desktop.
3222
-->
23+
<link rel="manifest" href="/manifest.json" />
3324
<title>Performance Evaluation</title>
3425
<script type="text/javascript">
3526
// Single Page Apps for GitHub Pages
@@ -71,15 +62,6 @@
7162
<body>
7263
<noscript>You need to enable JavaScript to run this app.</noscript>
7364
<div id="root"></div>
74-
<!--
75-
This HTML file is a template.
76-
If you open it directly in the browser, you will see an empty page.
77-
78-
You can add webfonts, meta tags, or analytics to this file.
79-
The build step will place the bundled scripts into the <body> tag.
80-
81-
To begin the development, run `npm start` or `yarn start`.
82-
To create a production bundle, use `npm run build` or `yarn build`.
83-
-->
65+
<script type="module" src="/src/index.tsx"></script>
8466
</body>
85-
</html>
67+
</html>

0 commit comments

Comments
 (0)