mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Adds new server which requires node. Real basic, real crap
This commit is contained in:
38
web/glorious-web/Server.js
Normal file
38
web/glorious-web/Server.js
Normal file
@@ -0,0 +1,38 @@
|
||||
var express = require('express')
|
||||
, app = express();
|
||||
var request = require('request');
|
||||
|
||||
var path = __dirname + '/views/';
|
||||
|
||||
app.listen(80, function(){
|
||||
console.log('CORS-enabled web server listening on port 80');
|
||||
});
|
||||
|
||||
|
||||
app.get("/",function(req,res){
|
||||
res.sendFile(path + "index.html");
|
||||
});
|
||||
|
||||
app.get("/about",function(req,res){
|
||||
res.sendFile(path + "about.html");
|
||||
});
|
||||
|
||||
app.get("/contact",function(req,res){
|
||||
res.sendFile(path + "contact.html");
|
||||
});
|
||||
|
||||
|
||||
app.listen(3000,function(){
|
||||
console.log("Live at Port 3000");
|
||||
});
|
||||
|
||||
|
||||
|
||||
app.get('/Data/:path', function (req, res) {
|
||||
request({
|
||||
url :'http://localhost:8080/exchanges/Poloniex/latest/BTC_LTC'
|
||||
},function(err, resp, body){
|
||||
res.send(body);
|
||||
})
|
||||
|
||||
});
|
||||
10
web/glorious-web/package.json
Normal file
10
web/glorious-web/package.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name" : "website-using-express",
|
||||
"version" : "0.0.1",
|
||||
"scripts" : {
|
||||
"start" : "node Server.js"
|
||||
},
|
||||
"dependencies" : {
|
||||
"express" : "latest"
|
||||
}
|
||||
}
|
||||
25
web/glorious-web/views/about.html
Normal file
25
web/glorious-web/views/about.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div>
|
||||
<nav class="navbar navbar-inverse" role="navigation" style="padding-left:130px;">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active"><a href="/about">About us<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/contact">Contact us</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="jumbotron">
|
||||
<p>
|
||||
Put detail description about you and your company.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
56
web/glorious-web/views/contact.html
Normal file
56
web/glorious-web/views/contact.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div>
|
||||
<nav class="navbar navbar-inverse" role="navigation" style="padding-left:130px;">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/about">About us</a></li>
|
||||
<li class="active"><a href="/contact">Contact us<span class="sr-only">(current)</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<br/>
|
||||
<form class="form-horizontal" role="form" style="width: 50%;">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="First & Last Name" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" id="email" name="email" placeholder="example@domain.com" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-2 control-label">Message</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="4" name="message"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="human" class="col-sm-2 control-label">2 + 3 = ?</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="human" name="human" placeholder="Your Answer">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<input id="submit" name="submit" type="submit" value="Send" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<! Will be used to display an alert to the user>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
30
web/glorious-web/views/index.html
Normal file
30
web/glorious-web/views/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Single page web app using Angularjs</title>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular-route.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div>
|
||||
<nav class="navbar navbar-inverse" role="navigation" style="padding-left:130px;">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="/">Home<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/about">About us</a></li>
|
||||
<li><a href="/contact">Contact us</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="jumbotron"> <p>
|
||||
This is place to put content. You can put slider, short description about your website and place some links for navigation.
|
||||
</p></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user