Heroku NodeJS app using OpenCV

后端 未结 2 1821
挽巷
挽巷 2021-01-22 21:23

I have tried so many buildpacks and googled so many SO articles, but I just cannot deploy my NodeJS app. All buildpacks are out-of-date for 2+ years and none of them work.

2条回答
  •  温柔的废话
    2021-01-22 22:13

    So, it is very well known that once you give up and post a question to SO, the solution eventually comes up!

    # NodeJS buildpack
    
    $ heroku buildpacks:add heroku/nodejs
    
    # OpenCV builbpack
    
    $ heroku buildpacks:add --index 1 https://github.com/automata/heroku-buildpack-opencv.git
    
    # Downgrade to Cedar 14
    # since on Cedar 16 it won't work without extra configurations
    
    $ heroku stack:set cedar-14
    
    # Push to Heroku
    
    $ git push heroku
    
    # After deploying your app may scale down to 0 dynos
    # ... so increase dynos amount to the desired number
    
    $ heroku ps:scale web=1
    

    Perfect for a hobby project!

    Note: if you have multiple apps, simply add --app YOUR-APP-NAME to the end of each command.

提交回复
热议问题