Giter Site home page Giter Site logo

hoophub's People

Contributors

olegkord avatar steve-chen-nyc avatar

Watchers

 avatar  avatar  avatar

hoophub's Issues

NPM init


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);
});```

Logout

User should be able to log out once signed in.

304 Status Code

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 - -

BE #1: users controller

Everything required in the users controller:

/users:

  1. Router.route('/')
    .post( (req,res) => { } ---> Generates a new user. Redirects to the user page

  2. 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

BE #2: Players controller

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

FE # 2- View Player Page

  1. create html / template for player profile
  2. create html / template for tweets
  3. create html / template for fantasy updates
  4. create html / template for stats

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.