Skip to content

Commit

Permalink
new user and login form in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
bigrobsf committed Nov 15, 2016
1 parent 68f4bdd commit c92694c
Show file tree
Hide file tree
Showing 38 changed files with 17,069 additions and 1 deletion.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014-2016 Materialize

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
40 changes: 39 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,44 @@
'use strict';
/* jshint esversion: 6 */
/* jshint devel: true */
/* jshint node: true */
/* jshint browser: true */

'use strict';
const express = require('express');
const app = express();
const path = require('path');
const ejs = require('ejs');
const PORT = process.env.PORT || 3009;

app.disable('x-powered-by');

const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser');
const morgan = require('morgan');

const users = require('./routes/users.js');
const token = require('./routes/token.js');
const index = require('./routes/index.js');
const transactions = require('./routes/transactions.js');

app.use(express.static(__dirname + '/public'));
app.use('/users', users);
app.use('/token', token);
app.use('/', index);
app.use('/transactions', transactions);

app.set('view engine', 'ejs');
app.set('views', [path.join(__dirname, 'views/users/'),
path.join(__dirname, 'views/stocks/'),
path.join(__dirname, 'views/site/')]);


// =============================================================================
// spin up the FTL
app.listen(PORT, () => {
console.log(`TradeTrack server is running on port ${PORT}`);
});

module.exports = {
app: app
};
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@
"knex": "knex",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bigrobsf/tradetrack.git"
},
"author": "Rob Conner and David Shin",
"license": "ISC",
"dependencies": {
"bcrypt-as-promised": "^1.1.0",
"cookie-parser": "^1.4.3",
"ejs": "^2.5.2",
"express": "^4.14.0",
"humps": "^2.0.0",
"knex": "^0.12.6",
"pg": "^6.1.0"
}
Expand Down
Loading

0 comments on commit c92694c

Please sign in to comment.