diff --git a/web/glorious-web/Server.js b/web/glorious-web/Server.js index ac06935d..ecdceec3 100644 --- a/web/glorious-web/Server.js +++ b/web/glorious-web/Server.js @@ -1,38 +1,38 @@ -var express = require('express') - , app = express(); -var request = require('request'); - - var path = __dirname + '/views/'; +var express = require('express'); +var app = express(); -app.listen(80, function(){ - console.log('CORS-enabled web server listening on port 80'); +// set the view engine to ejs +app.set('view engine', 'ejs'); + +// use res.render to load up an ejs view file + +// index page +app.get('/', function(req, res) { + res.render('pages/index', { + }); +}); + +// setting page +app.get('/settings', function(req, res) { + res.render('pages/settings', { + }); +}); + +// about page +app.get('/about', function(req, res) { + res.render('pages/about'); }); -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) { +app.get('/data/all-enabled-currencies', function (req, res) { request({ - url :'http://localhost:8080/exchanges/Poloniex/latest/BTC_LTC' + url :'http://localhost:9050/exchanges/enabled/latest/all' },function(err, resp, body){ res.send(body); }) +}); + +app.listen(80, function(){ + console.log('CORS-enabled web server listening on port 80'); }); \ No newline at end of file diff --git a/web/glorious-web/package.json b/web/glorious-web/package.json index 94a89b92..6ed86901 100644 --- a/web/glorious-web/package.json +++ b/web/glorious-web/package.json @@ -1,10 +1,11 @@ { - "name" : "website-using-express", + "name" : "gocryptotrader-website", "version" : "0.0.1", "scripts" : { "start" : "node Server.js" }, "dependencies" : { - "express" : "latest" + "express" : "latest", + "ejs":"latest" } } diff --git a/web/glorious-web/views/about.html b/web/glorious-web/views/about.html deleted file mode 100644 index 346c0ba7..00000000 --- a/web/glorious-web/views/about.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - -
-
- -
-
-
-

- Put detail description about you and your company. -

-
-
- - diff --git a/web/glorious-web/views/contact.html b/web/glorious-web/views/contact.html deleted file mode 100644 index 2fe1bb5c..00000000 --- a/web/glorious-web/views/contact.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -
-
- -
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
- -
-
-
-
- - diff --git a/web/glorious-web/views/index.html b/web/glorious-web/views/index.html deleted file mode 100644 index 87b33ef7..00000000 --- a/web/glorious-web/views/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -Single page web app using Angularjs - - - - - - - - -
-
- -
-
-

-This is place to put content. You can put slider, short description about your website and place some links for navigation. -

-
- - diff --git a/web/glorious-web/views/pages/about.ejs b/web/glorious-web/views/pages/about.ejs new file mode 100644 index 00000000..9a156802 --- /dev/null +++ b/web/glorious-web/views/pages/about.ejs @@ -0,0 +1,200 @@ + + + + + + <% include ../partials/head %> + + + +
+ <% include ../partials/header %> +
+ +
+
+
+ +
+
+

+ + README.md +

+ +

Cryptocurrency trading bot written in Golang

+ +

Build Status +Test Coverage

+ +

A cryptocurrency trading bot supporting multiple exchanges written in Golang.

+ +

Please note that this bot is under development and is not ready for production!

+ +

Exchange Support Table

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ExchangeREST APIStreaming APIFIX API
AlphapointYesYesNA
ANXPROYesNoNA
BitfinexYesYesNA
BitstampYesYesNA
BTCCYesYesNo
BTCEYesNANA
BTCMarketsYesNANA
CoinbaseYesYesNo
GeminiYesNANA
HuobiYesYesNo
ItBitYesNANA
KrakenYesNANA
LakeBTCYesYesNA
LocalBitcoinsYesNANA
OKCoin (both)YesYesNo
PoloniexYesYesNA
+ +

** NA means not applicable as the Exchange does not support the feature.

+ +

Current Features

+ +
    +
  • Support for all Exchange fiat and digital currencies, with the ability to individually toggle them on/off.
  • +
  • REST API support for all exchanges.
  • +
  • Websocket support for applicable exchanges.
  • +
  • Ability to turn off/on certain exchanges.
  • +
  • Ability to adjust manual polling timer for exchanges.
  • +
  • SMS notification support via SMS Gateway.
  • +
  • Basic event trigger system.
  • +
+ +

Planned Features

+ +
    +
  • WebGUI.
  • +
  • FIX support.
  • +
  • Expanding event trigger system.
  • +
  • TALib.
  • +
  • Trade history summary generation for tax purposes.
  • +
+ +

Please feel free to submit any pull requests or suggest any desired features to be added.

+ +

Compiling instructions

+ +

Download Go from https://golang.org/dl/
+Using a terminal, type go get github.com/thrasher-/gocryptotrader
+Change directory to the package directory, then type go install.
+Copy config_example.json to config.json.
+Make any neccessary changes to the config file.
+Run the application!

+ +

Binaries

+ +

Binaries will be published once the codebase reaches a stable condition.

+
+
+
+ +
+
+ +
+

Look I'm A Sidebar!

+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/web/glorious-web/views/pages/index.ejs b/web/glorious-web/views/pages/index.ejs new file mode 100644 index 00000000..dc80b817 --- /dev/null +++ b/web/glorious-web/views/pages/index.ejs @@ -0,0 +1,26 @@ + + + + + + <% include ../partials/head %> + + + +
+ <% include ../partials/header %> +
+ +
+
+

Hello world!

+ +
+
+ + + + + \ No newline at end of file diff --git a/web/glorious-web/views/pages/settings.ejs b/web/glorious-web/views/pages/settings.ejs new file mode 100644 index 00000000..582d5c3a --- /dev/null +++ b/web/glorious-web/views/pages/settings.ejs @@ -0,0 +1,27 @@ + + + + + + <% include ../partials/head %> + + + +
+ <% include ../partials/header %> +
+ +
+
+

Settings

+

This will be a visiual interface to edit the config file

+

Things like enabling exchanges, currencies and setting excahnge account settings

+
+
+ + + + + \ No newline at end of file diff --git a/web/glorious-web/views/partials/footer.ejs b/web/glorious-web/views/partials/footer.ejs new file mode 100644 index 00000000..4d4d8d41 --- /dev/null +++ b/web/glorious-web/views/partials/footer.ejs @@ -0,0 +1,3 @@ + + +

© Copyright 2016 GoCrypto Trader

\ No newline at end of file diff --git a/web/glorious-web/views/partials/head.ejs b/web/glorious-web/views/partials/head.ejs new file mode 100644 index 00000000..00ba9698 --- /dev/null +++ b/web/glorious-web/views/partials/head.ejs @@ -0,0 +1,11 @@ + + + +GoCrpto Trader + + + + + + + \ No newline at end of file diff --git a/web/glorious-web/views/partials/header.ejs b/web/glorious-web/views/partials/header.ejs new file mode 100644 index 00000000..ce5d59b8 --- /dev/null +++ b/web/glorious-web/views/partials/header.ejs @@ -0,0 +1,21 @@ + + + \ No newline at end of file