Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // load the things we need
- var express = require('express');
- var app = express();
- var cookieParser = require('cookie-parser');
- var bodyParser = require('body-parser');
- app.use(bodyParser.json());
- app.use(bodyParser.urlencoded({ extended: false }));
- app.use(cookieParser());
- var myData = require('./masterfeedtrim.json');
- console.log('Require:', myData);
- console.log(myData.make + ' ' + myData.description);
- // set the view engine to ejs
- app.set('view engine', 'ejs');
- // app.locals.appdata = require('./masterfeed.json');
- // use res.render to load up an ejs view file
- // index page
- app.get('/', function(req, res) {
- res.render('pages/index');
- myData: JSON.stringify(myData)
- });
- // about page
- app.get('/about', function(req, res) {
- res.render('pages/about');
- });
- app.listen(3000);
- console.log('Boom! its on Andre-3000');
- // on my index i'm using <%= myData.stock %>
- Require: { stock: 'AX104000',
- title: 'NEW',
- vin: '3HAJTSKL6EL767856',
- year: '2014',
- make: 'INTERNATIONAL',
- model: '4300',
- type: 'COMMERCIAL TRUCKS & TRAILERS & BUSES',
- body: 'MEDIUM DUTY TRUCKS - CAB & CHASSIS TRUCKS',
- mileage: '0',
- price_current: '76500',
- price_wholesale: '0',
- price_cost: '0',
- InternetPrice: '0',
- MSRP: '0',
- BookValue: '0',
- exterior: 'WHITE',
- interior: 'OTHER',
- doors: '2 DOORS',
- engine: 'M-7',
- transmission: 'AUTOMATIC',
- drive_type: 'ALL WHEEL DRIVE',
- fuel_type: 'DIESEL',
- warranty: '0',
- 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!!',
- 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',
- condition: 'EXCELLENT',
- date_in_stock: '2014-07-24 08:55:38',
- DealerName: 'Dealership Name',
- DealerContactPerson: 'Sales Managers',
- DealerPhone: '111.111.111',
- DealerEmail: 'dealer@email.com',
- DealerAddress: 'address',
- DealerCity: 'ALGER',
- DealerState: 'OH',
- DealerZIP: '11111',
- DealerCountry: 'USA',
- DealerID: '10',
- DealerGroup: 'dealersite.com',
- Certified: '0',
- User_price1: '306000',
- User_price2: '153000',
- User_price3: '76500',
- VehicleID: '2237581',
- DetailURL: 'http://dealersite.com/2014-international-4300_vid_2237581.html' }
- 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!!
- Boom! its on Andre-3000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement