Skip to content

Commit

Permalink
Merge pull request #69 from Rudra-Patel-code/feat/todo-app
Browse files Browse the repository at this point in the history
feat: added improved todo web app
  • Loading branch information
wajeshubham authored Jan 19, 2024
2 parents a846abd + 6fef3e5 commit 4c63636
Show file tree
Hide file tree
Showing 34 changed files with 5,462 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ACCESS_TOKEN_SECRET=LD9cv1kBfgRHVIg9GG_OGzh9TUkcyqgZAaM0o3DmVkx08MCFRSzMocyO3UtN
ACCESS_TOKEN_EXPIRY=1d # 1 day. Formats: https://github.com/vercel/ms#examples
REFRESH_TOKEN_SECRET=CMdDNtowK7fX0-5D9cv0oJ008MCFRSLHVTUkcyqgZAaIg9GG_OGzh9zMocyO3UtN1kBfLRn3DmVkxdO # ok to change
REFRESH_TOKEN_EXPIRY=10d # 10 days. Formats: https://github.com/vercel/ms#examples
# CORS_ORIGIN=http://localhost:3000 # add the frontend URL (more secure)
CORS_ORIGIN=* # allow all origins to make a request (recommended)
# CORS_ORIGIN=http://localhost # add the frontend URL (more secure)
CORS_ORIGIN=http://localhost:3000 # This must be ("*") or comma separated origins ("https://example1.com,https://example2.com,http://localhost:3000")
# ################# REQUIRED ENV VARS END #################

# ----------------------------------------------------------------------------------------------------------
Expand Down
18 changes: 18 additions & 0 deletions examples/todo-app/web/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
24 changes: 24 additions & 0 deletions examples/todo-app/web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
12 changes: 12 additions & 0 deletions examples/todo-app/web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Installation and setup

Create a `.env` file in the ROOT folder and copy past the content of the `.env.sample` file in it.

Run the following commands to start the server

```bash
npm install
npm run dev

# Make sure to keep the freeapi server running
```
13 changes: 13 additions & 0 deletions examples/todo-app/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!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>Todo</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 4c63636

Please sign in to comment.