@webjsdev/server 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +4 -4
- package/src/auth.js +1 -1
- package/src/dev.js +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @webjsdev/server
|
|
2
2
|
|
|
3
|
-
Dev + production server for [webjs](https://github.com/
|
|
3
|
+
Dev + production server for [webjs](https://github.com/webjsdev/webjs):
|
|
4
4
|
file-based routing, streaming SSR, server actions, WebSocket upgrades, and
|
|
5
5
|
live reload.
|
|
6
6
|
|
|
@@ -41,10 +41,10 @@ Or programmatically:
|
|
|
41
41
|
```js
|
|
42
42
|
import { startServer } from '@webjsdev/server';
|
|
43
43
|
|
|
44
|
-
await startServer({ port:
|
|
44
|
+
await startServer({ port: 8080, appDir: process.cwd(), dev: true });
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
See the full framework docs at https://github.com/
|
|
47
|
+
See the full framework docs at https://github.com/webjsdev/webjs.
|
|
48
48
|
|
|
49
49
|
## License
|
|
50
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webjsdev/server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "webjs dev/prod server: SSR, router, API, server actions, live reload",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/
|
|
27
|
+
"url": "git+https://github.com/webjsdev/webjs.git",
|
|
28
28
|
"directory": "packages/server"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://github.com/
|
|
31
|
-
"bugs": "https://github.com/
|
|
30
|
+
"homepage": "https://github.com/webjsdev/webjs#readme",
|
|
31
|
+
"bugs": "https://github.com/webjsdev/webjs/issues",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"keywords": [
|
|
34
34
|
"webjs",
|
package/src/auth.js
CHANGED
|
@@ -299,7 +299,7 @@ export function createAuth(config) {
|
|
|
299
299
|
|
|
300
300
|
async function oauthRedirect(provider, opts) {
|
|
301
301
|
const req = opts.req || getRequest();
|
|
302
|
-
const origin = req ? new URL(req.url).origin : 'http://localhost:
|
|
302
|
+
const origin = req ? new URL(req.url).origin : 'http://localhost:8080';
|
|
303
303
|
const state = randomId();
|
|
304
304
|
|
|
305
305
|
const url = new URL(provider.authorizationUrl);
|
package/src/dev.js
CHANGED
|
@@ -250,7 +250,7 @@ export async function createRequestHandler(opts) {
|
|
|
250
250
|
*/
|
|
251
251
|
export async function startServer(opts) {
|
|
252
252
|
const dev = !!opts.dev;
|
|
253
|
-
const port = opts.port ??
|
|
253
|
+
const port = opts.port ?? 8080;
|
|
254
254
|
// Compression default: on in prod, off in dev (cheaper to debug raw bytes).
|
|
255
255
|
const compress = opts.compress ?? !dev;
|
|
256
256
|
const logger = opts.logger || defaultLogger({ dev });
|