1

I need to create api by deployd but cannot open it on the localhost. This is my code

Variss-Air:nodeServer manjarb$ dpd create sportsstore
to start your app:
    $ cd sportsstore
    $ dpd
Variss-Air:nodeServer manjarb$ cd sportsstore
Variss-Air:sportsstore manjarb$ dpd -d
starting deployd v0.8.4...
listening on port 2403
type help for a list of commands
dpd > bye
Variss-Air:sportsstore manjarb$ 

But When it open the browser(Google chrome). On this address.

http://localhost:2403/dashboard/

I always got this

This webpage is not available

ERR_CONNECTION_REFUSED
Hide details
Google Chrome's connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.

So anyone knows how to fix it? Thanks!

Varis Darasirikul
  • 3,013
  • 5
  • 25
  • 35

2 Answers2

0

From your terminal log, it looks like you're terminating the dpd program and then trying to access the dashboard. You have to have dpd running if you want the dashboard or API to be accessible.

I'm actually working through the same book as you, Pro AngularJS? Here is the steps for getting deployd working:

$ cd deployd
$ dpd create sportsstore
$ cd sportsstore
$ dpd -p 5500 app.dpd
dpd > dashboard

The last line should bring up the dashboard in your default browser. Like I said above you must keep dpd running in the terminal to access the dashboard and the API.

You could run this command instead:

$ dpd -p 5500 app.dpd &

The ampersand (&) at the end will make the process run in the background, so you can then feel free to close the terminal or continue using it for other things.

ToastyMallows
  • 4,203
  • 5
  • 43
  • 52
0

I used the same solution as ToastyMallows. However, the first time I tried it, it failed. But, when I added sudo to the last terminal command, it worked. Other discussions I found led me to believe it may be a permission problem with Mongo (which I haven't solved yet). Anyhow, the following worked for me:

$ cd deployd
$ dpd create sportsstore
$ cd sportsstore
$ sudo dpd -p 5500 app.dpd
Password: 
dpd > dashboard
SuttonY
  • 370
  • 5
  • 5