Feature: Create a project

Let's add a project form for our feature Create a project. It consists of a large Add project button, a text box for our project name, and save and cancel buttons. Clicking on save will POST the project to our Express server, whereas, clicking on cancel closes the form.

What follows is an HTML template ./templates/project-form.hbs for a repository item:

<form class="form-inline">
  <ul class="errors help"></ul>
  <label>name</label>
  <input class="name" placeholder="project name" required="required" value="{{name}}" autofocus />
  <br/><button class="cancel btn btn-mini btn-primary form-btn">cancel</button>
  <button class="save btn btn-mini btn-primary form-btn form-spacer">save</button>
</form>

Let's make a few changes to router ...

Get Advanced Express Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.