Parameterized message tutorial continued
Create your routes file
- Create a folder at the root level and name it routes.
- 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.
// 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