Giter VIP home page Giter VIP logo

code-challenge's Introduction

Code Challenge

Requirements:

Running Application

Visit https://code-exercise.firebaseapp.com

Local Installation / Running

  1. npm install in this project directory
  2. npm start in this project directory
  3. http://localhost:3000

Local Apache Installation

  1. Enable Rewrite module
 LoadModule rewrite_module modules/mod_rewrite.so
  1. Add the following directive under default directory of your httpd.conf file:
	IndexIgnore */*
	# Turn on the RewriteEngine
	RewriteEngine On
	#  Rules
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule . index.html
  1. http://localhost (or whatever host/port specified)

Deploying to Firebase

  • Crate an account from Firebase
  • Create an app with a 'ExampleName' and edit firebase.json app name as your 'ExampleName'
  • And then:
npm install -g firebase-tools
npm login
firebase deploy
firebase open

Test

Go to https://code-exercise.firebaseapp.com/test depending on your installation (Apache installation may not work properly

##Notes

  • Some Object Design Patterns are self identified with @OOP tag in the comments
  • The following commands can be used in Chrome or Firefox console to understand the app
// SIGNUP USER
// go to http://localhost/signup
var instances = require('util/shared-instance')();
moment = require('moment');
instances.addView.render();
instances.addView.model.set({
                username : 'not_email',
                fullName : 'test user',
                password : 'password',
                repeatPassword : 'password',
                birthday : moment()
              });
instances.addView.model.isValid()=== false;
instances.addView.model.set({
                username : '[email protected]',
                fullName : 'test user',
                password : 'password',
                repeatPassword : 'password',
                birthday : moment().subtract(20,'years')
              });
instances.addView.model.isValid()=== true;              
instances.addView.onSubmit();
  • Playing with FILTERING and SORTING for buddy list
// go to http://localhost/buddies
var instances = require('util/shared-instance')();
instances.buddyControlsView.model.set({sortBy: "defaultOrder", filterText: "am", filterPriority: false});
instances.buddyControlsView.render();
instances.buddyControlsView.model.set({sortBy: "defaultOrder", filterText: "am", filterPriority: true});
instances.buddyControlsView.render();
instances.buddyControlsView.model.set({sortBy: "defaultOrder", filterText: "am", filterPriority: false});
instances.buddyControlsView.render();
instances.buddyControlsView.model.set({sortBy: "defaultOrder", filterText: "", filterPriority: false});
instances.buddyControlsView.render();
instances.buddyControlsView.model.set({sortBy: "username", filterText: "", filterPriority: false});
instances.buddyControlsView.render();
instances.buddyControlsView.model.set({sortBy: "status", filterText: "", filterPriority: false});
instances.buddyControlsView.render();

code-challenge's People

Contributors

metinex avatar

Watchers

 avatar

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.