Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
Use correct module resolution when requiring fastify from cli
Browse files Browse the repository at this point in the history
  • Loading branch information
yamalight committed Jun 13, 2019
1 parent 1bda16d commit 22b4748
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/exoframe-faas.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const loadedFunction = loadedFunctions[Object.keys(loadedFunctions)[0]];
// if function is http - start fastify
if (loadedFunction.type === 'http') {
try {
const fastify = require('fastify');
const fastifyPath = require.resolve('fastify', {paths: [currentFolder]});
const fastify = require(fastifyPath);
fastify()
.register(fastifyMiddleware)
.listen(8080, '0.0.0.0');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exoframe-faas",
"version": "0.3.0",
"version": "0.3.1",
"description": "Simple function deployments for Exoframe",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 22b4748

Please sign in to comment.