- app-restify.js: main application
- sql-db-table.sql: sql query for creating database & tables
- api/: all the apis that main application use
- api/auth/: apis for user authentication, use JWT
- api/database/: apis for accessing database & retrieve data (currently not located here yet)
- api/mode/: models that this application use
- Run command line or terminal
- Go to a folder where sql-db-table.sql file is located
- Type as following: your-mysql-location -u your-mysql-id -p < sql-db-table.sql
- Ex: usr/local/mysql/bin/mysql -u root -p < sql-db-table.sql
- Type password
- Create a user (sign-up).
- url: localhost:3000:/createUser
- body: { “userId”: “yourId”, “password”: “yourPassword”, “fname”: “firstName”, “lname”: “lastName”, “email”: “youremail@email.com” }
- Login (sign-in).
- url: localhost:3000/login
- body: { “userId”: “yourId”, “password”: “yourPassword” }
- Logout (sign-out) (requires session).
- url: localhost:3000/logout
- header
- key: x-access-token
- value: yourToken
- body: { “userId”: “yourId”, “password”: “yourPassword” }
- Update a user’s email or name (requires session).
- url: localhost:3000/updateUser
- header
- key: x-access-token
- value: yourToken
- body: { “userId”: “yourId”, “password”: “yourPassword”, “fname”: “firstName”, “lname”: “lastName”, “email”: “youremail@email.com” }
- Retrieve project list (requires session).
- url: localhost:3000/projects/list
- header
- key: x-access-token
- value: yourToken
- body: { }
- Create a project (requires session).
- url: localhost:3000/projects/create
- header
- key: x-access-token
- value: yourToken
- body: { “title”: “projectTitle” }
- Retrieve a project (requires session).
- url: localhost:3000/projects/project
- header
- key: x-access-token
- value: yourToken
- body: { “projectId”: “targetProjectId” }
- Create a task list (requires session).
- url: localhost:3000/projects/project/createTaskList
- header
- key: x-access-token
- value: yourToken
- body: { “title”: “taskTitle”, “todo”: “taskToDo”, “taskListId”: “targetTaskListId” }
- Create a task (requires session).
- url: localhost:3000/projects/project/taskList/createTask
- header
- key: x-access-token
- value: yourToken
- body: { “title”: “taskListTitle”, “projectId”: “targetProjectId” }
- Move Task within a List or between Lists (require session).
- url: localhost:3000/projects/project/taskList/switchTaskWithinList
- header
- key: x-access-token
- value: yourToken
- body: { “taskListId”: “targetTaskListId”, “taskId”: “targetTaskId”, “switchOrder”: “targetSwitchOrder” }
- Move Task between Lists (require session).
- url: localhost:3000/projects/project/taskList/moveTaskToOtherList
- header
- key: x-access-token
- value: yourToken
- body: { “taskListId”: “targetTaskListId”, “moveToTaskListId”: “targetMoveToTaskListId”, “taskId”: “targetTaskId” }
- Search Tasks (requires session).
- NOT IMPLEMENTED YET
- IMPLEMENT Search Task
- IMPLEMENT Unit Test
- IMPLEMENT Integration Test
- Remove unnecessary files, remove unnecessary logs & re-arrange application structure
- Add encryption & decryption for user passwords
- Catch & fix bugs