olegkord / hoophub Goto Github PK
View Code? Open in Web Editor NEWNode JS project for General Assembly WDI
Node JS project for General Assembly WDI
This is possibly a feature?
No idea why this is happening
make all dependancies const.
Makes sure to replace all var with let.
Implement Bcrypt for user authentication
consolidate functions so that it's cleaned up.
It is polluting our scrypts file and should be hidden
use node-tweet-streem npm. connect to public stream and get all tweets (search Player Name) pertaining to specific players in player profile
With us registering so many click events, there is bound to be chaos with click events given that we HIDE divs and don't actually remove them.
Suggestion: put a "reset clicks" function at the start of every reset
let express = require('express');
let path = require('path');
let logger = require('morgan');
let bodyParser = require('body-parser');
let app = express();
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false}));
app.use(express.static(path.join(__dirname, 'public')));
let mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/museumrApp');
let db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', (callback) => {
console.log('mongoose connected');
})
let home = require('./controllers/home');
let artist = require('./controllers/artists_controller');
let painting = require('./controllers/paintings_controller');
app.use('/', home);
app.use('/artists', artist);
app.use('/paintings', painting);
let server = app.listen(3000, () => {
let host = server.address().address;
let port = server.address().port;
console.log('connected on port: '+port+' host: '+host);
});```
User should be able to log out once signed in.
Front end - Index.html file
UnauthorizedError: No authorization token was found
Crate Models folder
if there aren't any results for yesterday's game app may crash.
ensures that user-names / emails cannot be duplicated. Write validations in user models
I will add it back in later today.
Search player by name still works.
Need to update Edit and delete user ajax request
^
Create Users / Players Models
current error message: TypeError: Cannot read property 'authenticate' of null
To keep accurate data, we need to ping the API to see if there are any updates.
What will the database look like?
Design Schemas
download moment and adjust DATE in Fantasy Update div.
Click create new user button - getting 304 status code.
GET / 304 0.485 ms - -
GET / 304 0.538 ms - -
GET /style.css 304 1.174 ms - -
GET /script.js 304 0.451 ms - -
adjust opacity of background while isolating content.
Everything required in the users controller:
/users:
Router.route('/')
.post( (req,res) => { } ---> Generates a new user. Redirects to the user page
Router.route('/:id')
.get( (req,res) => etc ---> request user information for ONE user
.post( (req,res) => ---> edit a user specified in ID
.delete( (req,res) => etc ---> delete user specified in ID
This will be the setup
Generate controllers folder
Allow user to upload a custom avatar image
IF NOT --> Maybe hit the API for graviton (or whatever that random image thing is)
Render templates / ajax requests / click events
Mongo DB expects player name in query to match exactly and is case sensitive. Thus we need to control what the user searches for very closely.
One for templates, one for straight HTML, etc
Everything required in the players controller.
AAU, IWT add a player to my "player list,"
AAU, IWT delete a player from my "player list,"
AAU, IWT view all of my players
Routes:
router.route('/:id')
.get( (req,res) { } --> gets a player by ID
.post( (req,res) { } --> add a player to the database of players
Can't post new user due to 404.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.