Creating an appointment reminder app with Node SDK
Testing your application
Let's put your SMS appointment reminder app through its paces!
- Start a terminal or command prompt, navigate into
sinch-appointment-reminder
, and run the commandnpx nodemon app.js
You should see the following on your console.
[nodemon] 3.1.0 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,cjs,json [nodemon] starting `node app.js` server started on port 3000
- As we noted at the beginning, nodemon automatically updates your app when you change a code file. Here's what you should see if you do this.
[nodemon] restarting due to changes... [nodemon] starting `node app.js` server started on port 3000
- Open a browser and navigate to the port on which the server is running. In this case, you would navigate to http://localhost:3000/.
- Try it out! Input an appointment for John Ricardo with Dr Jane Doe. Be sure to set the time and date so that the appointment is at least two hours and five minutes into the future. When you submit the appointment details, the application redirects you to a success page.
You should also get a text a couple of hours before the appointed time. (If you're doing this yourself, you may want to choose a date and time closer to the present!)