Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var express = require("express");
// Create the API application.
var api = express();
api.get("/v1/money", function(req, res) {
res.json({ "bling": "$$$" });
module.exports = api;
var express = require("express");
// Create the main application.
var app = express();
// Mount the API express app on `/api`.
app.use("/api", require("./api"));
// Send some strings.
app.get("/", function(req, res) {
res.send("Hello world!");
// Listen here.
app.listen(8080, "");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment