@paralect/hive 0.1.46 → 0.1.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paralect/hive",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -50,7 +50,7 @@ const main = async () => {
50
50
  app.use(mount("/health", get.handler));
51
51
  app.use(requestLogger());
52
52
 
53
- routes(app);
53
+ await routes(app);
54
54
 
55
55
  const server = http.createServer(app.callback());
56
56
 
@@ -71,7 +71,7 @@ export default async (app) => {
71
71
 
72
72
  const [resources, allMiddlewares] = await Promise.all([getResources(), getMiddlewares()]);
73
73
 
74
- _.each(resources, async ({ name: resourceName }) => {
74
+ await Promise.all(_.map(resources, async ({ name: resourceName }) => {
75
75
  const resourceRouter = new Router();
76
76
  const globalRouter = new Router();
77
77
  const endpoints = await Promise.all((await getResourceEndpoints(resourceName))
@@ -168,5 +168,5 @@ export default async (app) => {
168
168
 
169
169
  app.use(globalRouter.routes());
170
170
  app.use(mount(`/${resourceName}`, resourceRouter.routes()));
171
- });
171
+ }));
172
172
  };