maxserver 0.0.7 → 0.0.9
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 +8 -3
- package/package.json +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
<br>
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# maxserver
|
|
7
|
+
‼️ **ATTENTION** ‼️ - Not download yet, check out few days later 😉
|
|
8
|
+
I am simplifying and improving things, that it will work for everyone plugn play.
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
-> Node server setup based on **Fastify** with a new simple route loader.
|
|
9
13
|
|
|
10
14
|
- **Route loader**: auto-register routes and schemas
|
|
11
15
|
- **JWT auth** (cookie or `Authorization: Bearer ...`)
|
|
@@ -31,7 +35,7 @@ maxserver(options) forwards options to fastify(options).
|
|
|
31
35
|
It returns the fully configured Fastify server instance.
|
|
32
36
|
|
|
33
37
|
```js
|
|
34
|
-
import maxserver from "
|
|
38
|
+
import maxserver from "maxserver";
|
|
35
39
|
const server = await maxserver();
|
|
36
40
|
const address = await server.listen({
|
|
37
41
|
port: Number(process.env.PORT || 3000),
|
|
@@ -44,6 +48,7 @@ export default server;
|
|
|
44
48
|
---
|
|
45
49
|
|
|
46
50
|
## ⚙️ Configuration (Environment)
|
|
51
|
+
Configure the server by setting variabels in your .env file.
|
|
47
52
|
|
|
48
53
|
| Variable | Default | Description |
|
|
49
54
|
| :--- | :--- | :--- |
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export default async function maxserver(options = {}) {
|
|
|
22
22
|
trustProxy: true,
|
|
23
23
|
https: getHttpsOptions() || undefined,
|
|
24
24
|
|
|
25
|
-
// To allow writing example
|
|
25
|
+
// To allow writing example value fields to schemas for doucumentation
|
|
26
26
|
ajv: { customOptions: { strictSchema: false } },
|
|
27
27
|
...options,
|
|
28
28
|
});
|