-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): migrate to TypeScript
- Loading branch information
Showing
19 changed files
with
264 additions
and
226 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -17,5 +17,4 @@ replit.nix | |
.env.test.local | ||
.env.production.local | ||
/cache/ | ||
package-lock.json | ||
bun.lockb | ||
dist |
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,11 +1,26 @@ | ||
FROM node:lts-alpine | ||
FROM node:lts-alpine AS build | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json package-lock.json ./ | ||
|
||
RUN npm ci | ||
|
||
COPY . . | ||
|
||
RUN npm install --omit=dev | ||
RUN npm run build | ||
|
||
FROM node:lts-alpine AS production | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app/package.json /app/package-lock.json ./ | ||
|
||
RUN npm ci --omit=dev | ||
|
||
EXPOSE ${PORT} | ||
# COPY assets and html | ||
COPY --from=build /app/assets ./assets | ||
COPY --from=build /app/html ./html | ||
COPY --from=build /app/dist ./dist | ||
|
||
CMD ["npm", "start"] | ||
CMD ["node", "dist/index.js"] |
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 was deleted.
Oops, something went wrong.
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,10 @@ | ||
import globals from 'globals'; | ||
import pluginJs from '@eslint/js'; | ||
import ts_eslint from 'typescript-eslint'; | ||
|
||
export default [ | ||
{ files: ['**/*.{js,mjs,cjs,ts}'] }, | ||
{ languageOptions: { globals: globals.node } }, | ||
pluginJs.configs.recommended, | ||
...ts_eslint.configs.recommended, | ||
]; |
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,21 +1,25 @@ | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<title>Error Occured!</title> | ||
<title>Error Occurred!</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> | ||
<link rel="stylesheet" href="../style.css" /> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
<script> | ||
tailwind.config = { | ||
// Use system dark mode | ||
darkMode: 'media', | ||
}; | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div class="error_success"> | ||
<center> | ||
<img | ||
src="../cross.png" | ||
alt="Verified" | ||
style="width: 100px; height: 100px" /> | ||
<h1><%= messageText %></h1> | ||
</center> | ||
<body class="dark:bg-black"> | ||
<div class="h-screen flex flex-col justify-center items-center"> | ||
<img | ||
src="../cross.png" | ||
alt="Verified" | ||
class="w-[100px] h-[100px] mb-10" /> | ||
<h1 class="text-3xl font-bold text-red-500"><%= messageText %></h1> | ||
</div> | ||
</body> | ||
</html> |
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,21 +1,25 @@ | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<title>Success!</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="../style.css" /> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
<script> | ||
tailwind.config = { | ||
// Use system dark mode | ||
darkMode: 'media', | ||
}; | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div class="error_success"> | ||
<center> | ||
<img | ||
src="../tick-label.png" | ||
alt="Success" | ||
style="width: 100px; height: 100px" /> | ||
<h1><%= messageText %></h1> | ||
</center> | ||
<body class="dark:bg-black"> | ||
<div class="h-screen flex flex-col justify-center items-center"> | ||
<img | ||
src="../tick-label.png" | ||
alt="Success" | ||
class="w-[100px] h-[100px] mb-10" /> | ||
<h1 class="text-3xl font-bold text-green-500"><%= messageText %></h1> | ||
</div> | ||
</body> | ||
</html> |
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,21 +1,25 @@ | ||
<html> | ||
<html lang="en"> | ||
<head> | ||
<title>Verified!</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="stylesheet" href="../style.css" /> | ||
<script src="https://cdn.tailwindcss.com"></script> | ||
<script> | ||
tailwind.config = { | ||
// Use system dark mode | ||
darkMode: 'media', | ||
}; | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<div class="verified"> | ||
<center> | ||
<img | ||
src="../tick-label.png" | ||
alt="Verified" | ||
style="width: 100px; height: 100px" /> | ||
<h1>Verified</h1> | ||
</center> | ||
<body class="dark:bg-black"> | ||
<div class="h-screen flex flex-col justify-center items-center"> | ||
<img | ||
src="../tick-label.png" | ||
alt="Verified" | ||
class="w-[100px] h-[100px] mb-10" /> | ||
<h1 class="text-3xl font-bold text-green-500"><%= messageText %></h1> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.