@neoxr/webly 0.0.1 → 0.0.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 CHANGED
@@ -25,7 +25,7 @@ Below is an example setup using Webly, App, and Loader from the **@neoxr/webly**
25
25
 
26
26
  ```
27
27
  root/
28
- ├── app.js
28
+ ├── index.js
29
29
  ├── routers/
30
30
  │ ├── index.js
31
31
  │ └── example.js
@@ -35,6 +35,7 @@ root/
35
35
  │ └── system/
36
36
  │ └── middleware.js
37
37
  └── public/
38
+ ├── 404.html
38
39
  └── index.html
39
40
  ```
40
41
 
@@ -52,10 +53,14 @@ await Loader.scraper('./lib/scraper')
52
53
  // Initialize the Webly application
53
54
  const app = new App({
54
55
  name: 'Open-API',
55
- staticPath: './public',
56
+ staticPath: ['public'],
56
57
  routePath: './routers',
57
58
  middleware,
58
- port: 3000
59
+ socket: false,
60
+ port: 3000,
61
+ error: (req, res) => {
62
+ res.status(404).sendFile('./public/404.html', { root: process.cwd() })
63
+ }
59
64
  })
60
65
 
61
66
  // Start the server