Skip to content

Commit

Permalink
added svelete frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Masterjx9 committed Dec 24, 2024
1 parent 2eba09d commit c02fbb7
Show file tree
Hide file tree
Showing 16 changed files with 2,498 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask_backend/app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from flask import Flask, request, send_file, g, render_template
from flask_cors import CORS
import common
import uuid
import os
import shutil
app = Flask(__name__)
CORS(app)

@app.route('/')
def index():
Expand Down Expand Up @@ -52,4 +54,4 @@ def cleanup(response):
return response

if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True, host='0.0.0.0', port=5000)
23 changes: 23 additions & 0 deletions flask_backend/webapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions flask_backend/webapp/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
4 changes: 4 additions & 0 deletions flask_backend/webapp/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
15 changes: 15 additions & 0 deletions flask_backend/webapp/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
38 changes: 38 additions & 0 deletions flask_backend/webapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# sv

Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
Loading

0 comments on commit c02fbb7

Please sign in to comment.