Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // node app.js
- const express = require('express');
- const cors = require('cors')
- const _ = require('lodash')
- const app = express()
- app.use(cors())
- app.get('/', function(req, res) {
- res.send('Hello World!');
- })
- app.get('/skillz', function(req, res) {
- res.send([{"id":0,"title":"Dog walker","image_url":"https://media.angieslist.com/s3fs-public/dogwalker_1.jpeg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Arnold Schwarzenegger","email":"arnold@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":1,"title":"Carpenter","image_url":"http://www.handdyman.com/img/carpenter.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Alon Eliyahu","email":"alon@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":2,"title":"Computer","image_url":"https://ituedu-141b.kxcdn.com/wp-content/uploads/2017/04/IMG_3467-2.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Tomer Markowitz","email":"tomer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":3,"title":"Gardener","image_url":"https://i.ytimg.com/vi/3kXWJs0voHA/maxresdefault.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Ronen Abraham","email":"ronen@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":4,"title":"Glass Blower","image_url":"http://www.toledomuseum.org/wordpress/wp-content/uploads/lino_press_release.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Omer Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":5,"title":"Painter","image_url":"http://www.18004painter.com.au/ressources/images/caf91d6325dc.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Raz Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":6,"title":"Photographer","image_url":"https://posterjackcanada.files.wordpress.com/2013/12/silhouette-photographer-tripod-sunset-sunrise.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Raz Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":7,"title":"Woodworker","image_url":"http://woodworkinghelp.org/wp-content/uploads/2016/04/What-is-woodworking.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Raz Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":8,"title":"Yoga","image_url":"https://www.yogajournal.com/.image/t_share/MTQ2MjA3NTgyMzI2MTA1MTA1/yjlive-bow-pose.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Raz Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5},{"id":9,"title":"Veterinarian","image_url":"http://mississippivetboard.org/wp-content/uploads/2013/06/Veterinarian.jpg","likes":100,"user":{"id":0,"fbid":92842795382,"name":"Raz Abraham","email":"omer@gmail.com","gender":"male","birthday":1498112607152},"reviews":5}]);
- })
- app.get('/board', function(req, res) {
- res.send(_.map(Array(100), (n, i) => {
- return {
- id: i,
- title: 'Cat Walker',
- description: 'I am a white woman, looking for a strong man to walk my cat. So if you\'re up to the job, call me!!!'
- }
- }));
- })
- app.get('/skill/:id', function(req, res) {
- res.send({
- });
- })
- app.listen(3000, function() {
- console.log('Example app listening on port 3000!')
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement