@stanlemon/app-template 0.3.0 → 0.3.1
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/app.js +5 -5
- package/app.test.js +1 -1
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAppServer,
|
|
3
3
|
asyncJsonHandler as handler,
|
|
4
|
+
createDb,
|
|
4
5
|
LowDBUserDao,
|
|
5
6
|
} from "@stanlemon/server-with-auth";
|
|
6
7
|
import { v4 as uuid } from "uuid";
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
|
|
9
|
+
export const db = createDb();
|
|
10
|
+
const dao = new LowDBUserDao(db);
|
|
11
|
+
|
|
10
12
|
db.data.items = db.data.items || [];
|
|
11
13
|
|
|
12
|
-
const app = createAppServer({
|
|
14
|
+
export const app = createAppServer({
|
|
13
15
|
webpack: "http://localhost:8080",
|
|
14
16
|
secure: ["/api/"],
|
|
15
17
|
dao,
|
|
@@ -37,5 +39,3 @@ app.delete(
|
|
|
37
39
|
return db.data.items;
|
|
38
40
|
})
|
|
39
41
|
);
|
|
40
|
-
|
|
41
|
-
export default app;
|
package/app.test.js
CHANGED
package/package.json
CHANGED