To solve our empty database and before we create our frontend interface, let's add some data with the Chrome extension Postman. By the way, it's a very useful browser interface to work with RESTful APIs.
As we already know that our database is empty, our first task is to insert a record. To do so, perform the following steps:
Open Postman and enter
http://localhost:8080/api/speakers
. Select the x-www-form-urlencoded option and add the properties of our model:var SpeakerSchema = new Schema({ name: { type: String, default: '' }, company: { type: String, default: '' }, title: { type: String, default: '' }, description: { type: String, default: '' }, picture: { type: String, default: '' }, schedule: { type: String, default: '' }, createdOn: { type: Date, default: Date.now} });
Now, click on the blue button at the end to send the request.
With everything going as expected, you should see message: speaker...