dongzhang6544 2016-06-08 07:59
浏览 72
已采纳

Heroku Golang-找不到命令'main'

I got a Go API up on Heroku to which I push some code; in my procfile I have the following

web: main

In order to launch the Go built binary on Heroku's side. When I build it on my side with

go build cmd/main.go

It produces a binary file namned 'main' in my project root and works as expected but on Heroku I get

app[web.1]: bash: main: No such file or directory

The build process on Heroku seems fine, it finds all my dependencies and installs/compiles it all.

  • 写回答

2条回答 默认 最新

  • douchui4815 2016-06-08 08:09
    关注

    This was super simple once I realised this;

    All main packages in the repo are compiled and binaries placed in the /app/bin directory, which is in the PATH. Binaries are named after the directory that contains them.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)