Skip to content

Instantly share code, notes, and snippets.

@kaworu
Created July 13, 2017 08:54
Show Gist options
  • Select an option

  • Save kaworu/1bfe4ca4ae89d9c223f90a998ccc7a69 to your computer and use it in GitHub Desktop.

Select an option

Save kaworu/1bfe4ca4ae89d9c223f90a998ccc7a69 to your computer and use it in GitHub Desktop.
"use strict";
const express = require("express");
const app = express();
app.get('/api/users/:user_id/pictures/:picture_id', function (req, res) {
User.findById(req.params.user_id).then(() => {
Picture.findById(req.params.picture_id).then() => {...}});
});
app.listen(3000, () => console.log('listening on port 3000!'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment