RedwoodJS

v0.19.0

# Administration

Having the admin screens at /admin is a reasonable thing to do. Let's update the routes to make that happen by updating the four routes starting with /posts to start with /admin/posts instead:

// web/src/Routes.js

<Route path="/admin/posts/new" page={NewPostPage} name="newPost" />
<Route path="/admin/posts/{id:Int}/edit" page={EditPostPage} name="editPost" />
<Route path="/admin/posts/{id:Int}" page={PostPage} name="post" />
<Route path="/admin/posts" page={PostsPage} name="posts" />

Head to http://localhost:8910/admin/posts and our generated scaffold page should come up. Thanks to named routes we don't have to update any of the <Link>s that were generated by the scaffolds since the names of the pages didn't change!

On the last page we said we were going to set up an admin section and put it behind a login. So far, all we've done is updated the routes. Don't worry, we haven't forgotten! We will be setting up authentication in a future step.

How about getting this thing out into the real world?