Create groups tutorial continued

Create your routes file

  1. Create a folder at the root level and name it routes.
  2. Add a file called sinch.js to your routes folder.

This will be our route to handle POST requests (or sent messages) to the sinch SMS API.

Copy
Copied
// add requires
var express = require("express");
var router = express.Router();
router.post("/", function (req, res, next) {
  //echo the post
  res.json(req.body);
});
module.exports = router;

So, we're routed and setup to accept information.

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