-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.js
40 lines (35 loc) · 1.62 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
var express = require("express");
var bodyParser = require("body-parser");
var request = require("request")
var app = express();
app.set("view engine","ejs");
app.use(express.static("public"));
const results = require("./models/Results")
const home = require("./models/Home")
const scheduleOf = require("./models/ScheduleOf")
const tournamentResults = require("./models/Tournaments/TournamentResults")
const recentTournaments = require("./models/Tournaments/RecentTournament")
const tournamentInfo = require("./models/Tournaments/TournamentInfo")
const tournamentStandings = require("./models/Tournaments/TournamentStandings")
const tournamentLeaders = require("./models/Tournaments/TournamentLeaders")
const playerInfo = require("./models/PlayerInfo")
const matchInfo = require("./models/Matches/MatchInfo")
const matchProbabilities = require("./models/Matches/MatchProbabilities")
const matchLineups = require("./models/Matches/MatchLineups")
// var apiKey = ""; //write your api key here
app.get("/",home)
app.get("/results",results)
app.get("/scheduleOf-:id",scheduleOf)
app.get("/playerInfo-:id",playerInfo)
app.get("/recentTournaments",recentTournaments)
app.get("/tournamentInfo-:id",tournamentInfo)
app.get("/tournamentStandings-:id",tournamentStandings)
app.get("/tournamentLeaders-:id",tournamentLeaders)
app.get("/tournamentResults-:id",tournamentResults)
app.get("/match-:id",matchInfo)
app.get("/matchProbabilities-:id",matchProbabilities)
app.get("/lineups-:id",matchLineups)
var port = process.env.PORT || 4000
app.listen(port,function(){
console.log("Cricbuzz server started for " + port)
})