When we get errors for some of our applications, we have to look
. But if you use acil, your mistakes will come to your e-mail address.
Before we get started, you'll need to install Node and Yarn (or npm) and create a package.json
for your project if you haven't already.
yarn add acil @babel/node @babel/core @babel/preset-env --dev
Open package.json
and add the following scripts:
"scripts": {
"start": "acil server.js" // <-- your server application file
}
For custom advanced behavior of acil, you can create a acil.json in the root of your project
directory.
Take a look at the following acil.json
example:
{
"from": "Company Name <no-reply@company.com>",
// Each item in the list should be a tuple of (Full name, email address). Example:
"admins": ["Developer1 <developer1@company.com>", "Developer2 <developer2@company.com>"],
// !! Add it if you don't use Environment Variable (SENDGRID_API_KEY)
"sendGridApiKey": "SG.XXX",
"foreverOptions": {
// https://github.com/foreversd/forever-monitor#options-available-when-using-forever-in-nodejs
}
}
Acil
is currently using sendgrid for emails
. For this you need to create SENDGRID_API_KEY.
export SENDGRID_API_KEY=XXX
Add the line sendGridApiKey as follows:
{
...
"sendGridApiKey": "SG.XXX"
}