playmak3r commited on
Commit
ba5672b
1 Parent(s): ccdfe5f

feat: add server configuration

Browse files
Files changed (2) hide show
  1. server/app.py +17 -0
  2. vite.config.ts +3 -0
server/app.py CHANGED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, send_from_directory
2
+
3
+
4
+ app = Flask(__name__)
5
+
6
+ @app.route('/')
7
+ def index():
8
+ return send_from_directory('dist', "index.html")
9
+
10
+ @app.route('/assets/<path:filename>')
11
+ def download_file(filename):
12
+ return send_from_directory('dist/assets', filename)
13
+
14
+ if __name__ == '__main__':
15
+ app.run(debug=True)
16
+
17
+
vite.config.ts CHANGED
@@ -3,4 +3,7 @@ import solid from 'vite-plugin-solid'
3
 
4
  export default defineConfig({
5
  plugins: [solid()],
 
 
 
6
  })
 
3
 
4
  export default defineConfig({
5
  plugins: [solid()],
6
+ build: {
7
+ outDir: "server/dist"
8
+ }
9
  })