Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var router = express.Router();
- const CustomerConsumer = require('../service/customerConsumer');
- router.get('/customers', async (req, res) => {
- try {
- const customers = await CustomerConsumer.getCustomer();
- res.status(200).json(customers);
- } catch(error) {
- logger.error(`Error occured ${error.stack}`);
- res.status(500).send({error : error.message});
- }
- });
Add Comment
Please, Sign In to add comment