Creating an appointment reminder app with Node SDK

Testing your application

Let's put your SMS appointment reminder app through its paces!

  1. Start a terminal or command prompt, navigate into sinch-appointment-reminder, and run the command
    Copy
    Copied
    npx nodemon app.js

    You should see the following on your console.

    Copy
    Copied
    [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
  2. 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.
    Copy
    Copied
    [nodemon] restarting due to changes...
    [nodemon] starting `node app.js`
    server started on port 3000
  3. Open a browser and navigate to the port on which the server is running. In this case, you would navigate to http://localhost:3000/.
  4. 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!)



We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.