Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let endpoint = function(app) {
- app.post('/send-mail', function(req, res) {
- sgMail.setApiKey(process.env.VUE_APP_APIKEY);
- sgMail
- .send(req.body)
- .then(() => {
- // do something
- })
- .catch(error => {
- // do something
- });
- return res.send(req.body);
- });
- };
- MY_VAR=my_value node server.js
- VUE_APP_APIKEY=[API KEY VALUE]
- require('dotenv').config()
Add Comment
Please, Sign In to add comment