- Challenge 1 - [Sign Up Form] (https://github.com/metinex/code-challenge/blob/master/REQUIREMENTS.md#challenge-1-sign-up-requirements)
- Challenge 2 - [Buddies List] (https://github.com/metinex/code-challenge/blob/master/REQUIREMENTS.md#challenge-2-buddy-list-requirements)
Visit https://code-exercise.firebaseapp.com
- npm install in this project directory
- npm start in this project directory
- http://localhost:3000
- Enable Rewrite module
LoadModule rewrite_module modules/mod_rewrite.so
- 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
- http://localhost (or whatever host/port specified)
- 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
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();