From b845c945135495fcfae52a840aa11dd9453d89f2 Mon Sep 17 00:00:00 2001 From: Rob Secord Date: Tue, 17 Dec 2013 19:45:18 -0500 Subject: [PATCH] Update app.js - allow refresh Problem: When refreshing the page at a URL such as http://localhost:3000/view2 the Seed App fails, as Express has no route for /view2 Solution: Provide an index catch-all to render index, and allow Angular to handle the route to /view2 --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index f9a67467c..811cbbc3b 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,3 @@ - /** * Module dependencies */ @@ -43,6 +42,7 @@ if (app.get('env') === 'production') { // serve index and view partials app.get('/', routes.index); +app.get('/:name', routes.index); app.get('/partials/:name', routes.partials); // JSON API