Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.28 KB | None | 0 0
  1. // load the things we need
  2. var express = require('express');
  3. var app = express();
  4. var cookieParser = require('cookie-parser');
  5. var bodyParser = require('body-parser');
  6.  
  7.  
  8. app.use(bodyParser.json());
  9. app.use(bodyParser.urlencoded({ extended: false }));
  10. app.use(cookieParser());
  11.  
  12.  
  13.  
  14.  
  15. var myData = require('./masterfeedtrim.json');
  16. console.log('Require:', myData);
  17.  
  18. console.log(myData.make + ' ' + myData.description);
  19.  
  20. // set the view engine to ejs
  21. app.set('view engine', 'ejs');
  22.  
  23.  
  24. // app.locals.appdata = require('./masterfeed.json');
  25.  
  26. // use res.render to load up an ejs view file
  27.  
  28. // index page
  29. app.get('/', function(req, res) {
  30.     res.render('pages/index');
  31.              myData: JSON.stringify(myData)
  32. });
  33.  
  34. // about page
  35. app.get('/about', function(req, res) {
  36.     res.render('pages/about');
  37. });
  38.  
  39. app.listen(3000);
  40. console.log('Boom! its on Andre-3000');
  41.  
  42.  
  43.  
  44.  
  45. // on my index i'm using <%= myData.stock %>
  46.  
  47. Require: { stock: 'AX104000',
  48.   title: 'NEW',
  49.   vin: '3HAJTSKL6EL767856',
  50.   year: '2014',
  51.   make: 'INTERNATIONAL',
  52.   model: '4300',
  53.   type: 'COMMERCIAL TRUCKS & TRAILERS & BUSES',
  54.  body: 'MEDIUM DUTY TRUCKS - CAB & CHASSIS TRUCKS',
  55.  mileage: '0',
  56.  price_current: '76500',
  57.  price_wholesale: '0',
  58.  price_cost: '0',
  59.  InternetPrice: '0',
  60.  MSRP: '0',
  61.  BookValue: '0',
  62.  exterior: 'WHITE',
  63.  interior: 'OTHER',
  64.  doors: '2 DOORS',
  65.  engine: 'M-7',
  66.  transmission: 'AUTOMATIC',
  67.  drive_type: 'ALL WHEEL DRIVE',
  68.  fuel_type: 'DIESEL',
  69.  warranty: '0',
  70.  description: 'Allison 2500_RDS, Air Brakes, Air Ride 21000lb, Cloth Air Ride Driver Seat w 2 Man Passenger Seat, Leather Steering Wheel w Tilt Column, 70 Gal Polished Alum Fuel Tank, A/C, Cruise Control, Bright Vertical Exhaust, Pre SCR, WILL TAKE UP TO 28\' BODY!!',
  71.  pics: 'http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_02014142826.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_01570425300.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_03799792711.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_03057692395.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_00047904008.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_03040068798.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_01479927393.JPG;http://www.dealersite.com/images/auto/9681/223/2237581/auto_2237581_00965053061.JPG',
  72.   condition: 'EXCELLENT',
  73.   date_in_stock: '2014-07-24 08:55:38',
  74.   DealerName: 'Dealership Name',
  75.   DealerContactPerson: 'Sales Managers',
  76.   DealerPhone: '111.111.111',
  77.   DealerEmail: 'dealer@email.com',
  78.   DealerAddress: 'address',
  79.   DealerCity: 'ALGER',
  80.   DealerState: 'OH',
  81.   DealerZIP: '11111',
  82.   DealerCountry: 'USA',
  83.   DealerID: '10',
  84.   DealerGroup: 'dealersite.com',
  85.   Certified: '0',
  86.   User_price1: '306000',
  87.   User_price2: '153000',
  88.   User_price3: '76500',
  89.   VehicleID: '2237581',
  90.   DetailURL: 'http://dealersite.com/2014-international-4300_vid_2237581.html' }
  91. INTERNATIONAL Allison 2500_RDS, Air Brakes, Air Ride 21000lb, Cloth Air Ride Driver Seat w 2 Man Passenger Seat, Leather Steering Wheel w Tilt Column, 70 Gal Polished Alum Fuel Tank, A/C, Cruise Control, Bright Vertical Exhaust, Pre SCR, WILL TAKE UP TO 28' BODY!!
  92. Boom! its on Andre-3000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement