如何创建和渲染Heroku的app.json文件。

huangapple go评论59阅读模式
英文:

How to create and render an app.json file for Heroku

问题

我是一个Node.js开发者,我在构建我的app.json文件时遇到了问题。我想要构建一个app.json文件,以便可以明确地为Heroku分配构建包。

我手动创建了一个app.json文件,但我可以看出它与我的package.json文件不同。例如,当我运行npm init时,我会得到一个带有颜色方案和标志的package.json文件。当我创建一个app.json文件时,我得到的却是一个没有颜色的,就像创建一个.txt文件时一样。

app.json

"buildpacks": [
    {
      "url": "https://github.com/heroku/heroku-buildpack-pgbouncer"
    },
    {
      "url": "heroku/nodejs"
    }
  ],
  {
    "repository": "https://github.com/KeshawnSharper/BackEnd/tree/master"
  }
英文:

I am a node.js developer and I'm having trouble with building my app.json file. I want to build an app.json file so I can explicitly assign buildpacks to Heroku for deployment.

I manually created an app.json but I can tell it doesn't render like my package.json file. For example when I do npm init I get a package.json file with a color scheme and logo. When I create a app.json file I receive no color with the same logo you get when you create a .txt file.

app.json

"buildpacks": [
    {
      "url": "https://github.com/heroku/heroku-buildpack-pgbouncer"
    },
    {
      "url": "heroku/nodejs"
    }
  ]
  ,
  {
  "repository": "https://github.com/KeshawnSharper/BackEnd/tree/master""
} 

答案1

得分: 2

A json file start with { and finish with } is that the case in your file ?

一个以 { 开头并以 } 结尾的 JSON 文件,在你的文件中是这样的吗?

英文:

A json file start with { and finish with } is that the case in your file ?

huangapple
  • 本文由 发表于 2020年1月7日 01:01:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/59616122.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定