frontfire 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/FrontFire.js +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontfire",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/FrontFire.js CHANGED
@@ -63,11 +63,14 @@ export default async function frontFire( isWatch, cfg = {} )
63
63
  await ctx.watch();
64
64
  let { host, port } = await ctx.serve(
65
65
  {
66
- servedir : `.${path.sep}${rootBuildDir}${path.sep}debug`
66
+ servedir : `.${path.sep}${rootBuildDir}${path.sep}debug`,
67
+ // @todo use param for index.html
68
+ fallback : `.${path.sep}${rootBuildDir}${path.sep}debug${path.sep}index.html`
69
+ //onRequest : function ( ) { console.log( "Hello" ); }
67
70
  }
68
71
  );
69
72
 
70
- // Then start a proxy server on port 3000
73
+ // Then start a proxy server
71
74
  http.createServer((req, res) => {
72
75
 
73
76
  const options = {
@@ -75,7 +78,7 @@ export default async function frontFire( isWatch, cfg = {} )
75
78
  port: port,
76
79
  path: req.url,
77
80
  method: req.method,
78
- headers: req.headers,
81
+ headers: req.headers
79
82
  };
80
83
 
81
84
  if ( 'php' === indexType && req.url === "/" && req.method.toLowerCase() === 'get' )