2017-07-15 98 views
0

我正在使用Sail.js API和PostgreSQL作爲數據庫。Swagger UI + Sails.js

我想將Swagger UI集成到項目中。

-v v6.10.2

$帆-v 0.12.13

的應用程序啓動罰款sails lift

但是,當我按照這個link的步驟,我開始

$節點得到以下錯誤:

info: Starting app... 

dev => undefined 
debug: hookPath: /Users/yeko/***/node_modules/sails-swagger/dist/api/hooks/swagger 
debug: marlinspike (swagger): loading config from 
/Users/yeko/***/node_modules/sails-swagger/dist/config 
debug: marlinspike (swagger): loading Services from 
/Users/yeko/***/node_modules/sails-swagger/dist/api/services... 
warn: marlinspike (swagger): no Services found. skipping 
debug: marlinspike (swagger): loading Models... 
debug: marlinspike (swagger): loading Controllers... 
debug: marlinspike (swagger): loading Policies... 
warn: marlinspike (swagger): no Policies found. skipping 
error: A hook (`orm`) failed to load! 
error: Error (E_UNKNOWN) :: Encountered an unexpected error 

有人可以幫我整合Swagger UI?

謝謝。

回答

0

重新檢查後

(1) Recheck database credential. 
(2) Recheck syntax of each models.(Not missing any comma) 
(3) Check database is running or not.