Skip to content

Node API integration example: Part 1

Steve Astels edited this page Sep 4, 2020 · 2 revisions
// index.js

/**
 * External Modules
 */

const express = require("express");

/**
 * App Variables
 */

const app = express();
const port = "8000";

/**
 * Routes
 */

app.get("/", (req, res) => {
  res.status(200).send("Email sent");
});

/**
 * Server Activation
 */

app.listen(port, () => {
  console.log(`Listening on http://localhost:${port}`);
});