Archana
Archana

Reputation: 3

How to deploy angular-seed project on Heroku

I have tried following steps suggested in the blog below: https://medium.com/@matheusrma/deploying-angular-seed-to-heroku-12a5bb907467

But still I get this application error: http://cryptic-depths-3702.herokuapp.com/index.html

heroko logs shows Permission denied error:

2014-10-09T18:30:46.723952+00:00 heroku[web.1]: Starting process with command s cripts/web-server.js 2014-10-09T18:30:47.606840+00:00 app[web.1]: bash: scripts/web-server.js: Permission denied

How to fix it?

Upvotes: 0

Views: 923

Answers (2)

Spidy
Spidy

Reputation: 40002

A couple things you need to do.

First: Change your Procfile to:

web: npm start

Second: Change your package.json to have this:

"scripts": {
    "start": "node scripts/web-server.js"
}

Third: Remove the first line in web-server.js

#!/usr/bin/env node

Finally: You may have to scale your web dynos with:

heroku ps:scale web=1

Upvotes: 0

jjl2
jjl2

Reputation: 152

The angular-seed app has been updated since the post was written on March 10. The old repo has a directory called scripts that contains the web server script, but that does not exist in the most recent version.

It looks like the current version doesn't have anything to run on a webserver anymore, so you'll need to add something that runs content (through Grunt, Express, Gulp).

Update

You can use something like Yeoman to generate an Angular app that comes with a working Gruntfile to serve your content. You can copy or move the contents from the angular-seed app directory and use them to replace the generated app directory in the project repo generated by Yeoman.

Upvotes: 2

Related Questions