DEV Community

Yaşar İÇLİ
Yaşar İÇLİ

Posted on

Acil

Maybe many nodejs applications will work, but you may want to hear from errors.

All you have to do is use acil.

for example you have a nodejs application:

import express from 'express';
const app = express();

app.get('/', (req, res) => {

  hello // <-- this error send email

  res.send('Hello World!')
})

app.listen(3000)

Enter fullscreen mode Exit fullscreen mode

Let's add the package now.

yarn add acil @babel/node @babel/core @babel/preset-env --dev
Enter fullscreen mode Exit fullscreen mode

and add start script.

"scripts": {
  "start": "acil server.js" // <-- your server application file
}
Enter fullscreen mode Exit fullscreen mode

Take a look at the following acil.json example:

{
  "admins": ["yasaricli@gmail.com"],
  "from": "Company <no-reply@company.com>",
  "sendGridApiKey": "SG.XXX"
}
Enter fullscreen mode Exit fullscreen mode

and let's start.

yarn start
Enter fullscreen mode Exit fullscreen mode

It's that simple.

https://github.com/tsepeti/acil

Top comments (0)