Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Cannot GET / - what to do after installation #93

Closed
kwo opened this issue May 31, 2015 · 9 comments
Closed

Cannot GET / - what to do after installation #93

kwo opened this issue May 31, 2015 · 9 comments

Comments

@kwo
Copy link

kwo commented May 31, 2015

After following the getting started instructions at http://anvil.io/#getstarted, I'm not sure what to do next. Attempting to browse to the server URL at http://localhost:3000/ returns a plain text error message in the browser: "Cannot GET /". Do I need to customize the webapp first? How would I do that? Thx.

@oren
Copy link

oren commented May 31, 2015

I am in the process of getting everything up and running as well. I didn't finish yet but I can try helping you out. As far as i understand you need to also generate public and private RSA keys and locate them inside config/keys folder (you'll have to create that folder first).

Also, you'll need to tell your connect server about any client you want to use.
the command to do that is nv add. here is what I did:

nv add client '{ "client_name": "app1", "client_uri": "http://app1.myserver.com:9000", "redirect_uris": ["http://app1.myserver.com:9000/callback"], "post_logout_redirect_uris": ["http://myserver.com:9000"], "trusted": "true" }'

I also had to add this line to /etc/hosts:

127.0.0.1 app1.myserver.com

Save the output from that command. you'll need to enter the _id in the app that will use that server.

After running the connect server you'll want to also run at least one app that is using this server.
There is an angular example app here: https://github.com/anvilresearch/connect-example-angularjs
There is nothing in it's readme (yet). you'll need to npm install -g grunt-cli bower, npm install and bower install and tweak app/rb.html and app/script/app.js a bit so that app will know how to access things from the connect app (client_id and redirect_uri).
Running the client app is done with grunt serve.

I'll submit pull requests to both projects as soon as i'll figure it out!

@oren
Copy link

oren commented May 31, 2015

also, feel free to join the chat: https://gitter.im/anvilresearch/connect

@christiansmith
Copy link
Member

@kwo sorry for the incomplete instructions. We're in the process of completely rewriting the docs in this repo. The wiki has some mostly correct information, but it's missing some newer features.

The root path / doesn't actually respond with anything. I guess we should have it send a status message of some kind.

To see that the server is working, you can use the command $ nv uri to get an authorization url. That should take you to the signin page. The server isn't all that useful unless you have an app or two that integrate with it.

What language/framework/platform are you working with? Several libs are known to work with Anvil and many more should be usable with a little tweaking here and there.

I'll be on gitter for the most of the day today. Feel free to drop in and say hello.

@oren
Copy link

oren commented May 31, 2015

nv uri

Error: Cannot find module '/usr/lib/node_modules/anvil-connect/config/development.json

@christiansmith
Copy link
Member

Are you running that from the root of your project?

@oren
Copy link

oren commented May 31, 2015

nope.

cd ~/projects/connect-server 
nv uri

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1011:11)
at Process.ChildProcess._handle.onexit (child_process.js:802:34)

@adi-ads
Copy link

adi-ads commented May 31, 2015

nv version?

@oren
Copy link

oren commented May 31, 2015

nv -v => Anvil Connect v0.1.38

@kwo
Copy link
Author

kwo commented Jun 1, 2015

@christiansmith I'm developing in Node and Go and I see that there is another repository here with a node client (and I guess I can also use passport).

I just tried "nv uri" and that took me to a login page that I was expecting.

@kwo kwo closed this as completed Jun 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants