-
Notifications
You must be signed in to change notification settings - Fork 837
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve local setup and README (#291)
- Loading branch information
1 parent
ebfc1a6
commit 240551f
Showing
6 changed files
with
292 additions
and
4 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,7 @@ | ||
VITE_API_BASE_URL=http://localhost:8000/api/v1 | ||
|
||
# server to load artifacts from file URIs | ||
VITE_ARTIFACT_API_BASE_URL=http://localhost:9090 | ||
|
||
# your api key - for x-api-key header | ||
VITE_SKYVERN_API_KEY= |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { createServer } from "http"; | ||
import handler from "serve-handler"; | ||
import open from "open"; | ||
|
||
const port = 8080; | ||
const url = `http://localhost:${port}`; | ||
|
||
const server = createServer((request, response) => { | ||
// You pass two more arguments for config and middleware | ||
// More details here: https://github.com/vercel/serve-handler#options | ||
return handler(request, response, { | ||
public: "dist", | ||
rewrites: [ | ||
{ | ||
source: "**", | ||
destination: "/index.html", | ||
}, | ||
], | ||
}); | ||
}); | ||
|
||
server.listen(8080, async () => { | ||
console.log(`Running at ${url}`); | ||
await open(url); | ||
}); |
Oops, something went wrong.