Skip to content

Running this project #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raghunandy opened this issue Jun 16, 2016 · 1 comment
Closed

Running this project #1

raghunandy opened this issue Jun 16, 2016 · 1 comment

Comments

@raghunandy
Copy link

I am a beginner. I am trying to access the index page with various url combinations. Please update the document.

http://localhost:9000/index.html

@readren
Copy link
Owner

readren commented Jun 17, 2016

To start the web server:

  1. Go to the project root folder with the cd command, type activator, and wait the project builder initialization. This may take several minutes the first time.
  2. Then type compile and wait the builder builds the project. This also may take several minutes the first time.
  3. Then type re-start to start the web server. If everything is fine, the last line in the console should say "listening to http://localhost:9000".
  4. Open any web browser and type "http://localhost:9000" in the url address edit box. If everything is ok, you should see the TODO MVC example application running.

If you want the address "http://localhost:9000/index.html" also work, you should add another route to support it. I already did it, anyway. This is the code excerpt:
val indexRoute: Route = pathSingleSlash { getFromResource(index) } ~ pathPrefix("index.html") { getFromResource(index) }

Note that there are two branches of this project that replace the TODO MVC application with the "quick start" and the "tour of heroes" applications I copied from the official angular 2 page.
Thanks you for trying this seed :)

@readren readren closed this as completed Jun 17, 2016
readren added a commit that referenced this issue Jun 19, 2016
Add a route branch to support the address
"http://localhost:9000/index.html" be used to load the page.

Also, sepparate the route definition in many subroutes to make it more
readable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants