Skip to content

Commit

Permalink
fix commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jookie committed Aug 21, 2024
1 parent 663c48e commit cb2acaa
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 1 deletion.
9 changes: 9 additions & 0 deletions WorkPlace.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"folders": [
{
"name": "WorkPlace",
"path": "."
}
],
"settings": {}
}
11 changes: 11 additions & 0 deletions app/api/index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from flask import Flask

app = Flask(__name__)

@app.route('/')
def home():
return 'Hello, World!'

@app.route('/about')
def about():
return 'About'
16 changes: 16 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @type {import('next').NextConfig} */

module.exports = {
images: {
remotePatterns: [
Expand All @@ -11,3 +12,18 @@ module.exports = {
]
}
}
const nextConfig = {
rewrites: async () => {
return [
{
source: '/api/:path*',
destination:
process.env.NODE_ENV === 'development'
? 'http://127.0.0.1:5328/api/:path*'
: '/api/',
},
]
},
}

module.exports = nextConfig
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ lz4 # for ccxt
# plot
matplotlib # plot library
# data handling
numpy>=1.17.3 # data handling
numpy>=1.24.3 # data handling
pandas>=1.1.5 # data handling
# testing requirements
pytest # testing
Expand Down Expand Up @@ -39,6 +39,8 @@ stable-baselines3 # stable baselines3
gymnasium # for gym
# pytorch
# elegantrl
Flask==3.0.3
werkzeug==2.3.8



5 changes: 5 additions & 0 deletions vercel (1).json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rewrites": [
{ "source": "/(.*)", "destination": "/api/index" }
]
}
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rewrites": [
{ "source": "/(.*)", "destination": "/api/index" }
]
}

0 comments on commit cb2acaa

Please sign in to comment.