mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
allow port variable to be set for dev server
This commit is contained in:
parent
1d9870e706
commit
409275fa49
3 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import { createServer } from "esbuild-server";
|
||||
import copy from "esbuild-plugin-copy";
|
||||
import time from "esbuild-plugin-time";
|
||||
import "dotenv/config"
|
||||
|
||||
const devServer = createServer({
|
||||
entryPoints: {
|
||||
|
@ -45,7 +46,7 @@ const devServer = createServer({
|
|||
]
|
||||
}, {
|
||||
static: "./static",
|
||||
port: 1337,
|
||||
port: process.env.PORT || 1337,
|
||||
proxy: (path) => {
|
||||
if (path.startsWith("/bare/")) {
|
||||
return path.replace("/bare/", "http://127.0.0.1:3000/")
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"@mercuryworkshop/bare-as-module3": "^2.2.0-alpha",
|
||||
"@mercuryworkshop/epoxy-transport": "^1.1.0",
|
||||
"@mercuryworkshop/libcurl-transport": "^1.3.1",
|
||||
"dotenv": "^16.4.5",
|
||||
"@tomphttp/bare-server-node": "^2.0.3",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@types/serviceworker": "^0.0.85",
|
||||
|
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
|
@ -72,6 +72,9 @@ importers:
|
|||
concurrently:
|
||||
specifier: ^8.2.2
|
||||
version: 8.2.2
|
||||
dotenv:
|
||||
specifier: ^16.4.5
|
||||
version: 16.4.5
|
||||
esbuild:
|
||||
specifier: ^0.20.2
|
||||
version: 0.20.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue