1)Node.js should be running on localhost on port 8888, file index.js
npm install mysql to install mysql module in order to access MySQL db from Node.js
2)MySQL instance should be created with:
host : 'localhost',
user : 'testDbUser',
password : 'test123456',
database : 'test'
3)In "DB" folder I exported test db, so you can just imported it, it will create "users" table and also insert test data
4)"Testing" folder contians the front end, open index.html in browser of your choice
5)First thing the code will check is status of Node.js on localhost and port 8888 and also status of MySQL
6)You can test 4 different endpoints by clicking on different buttons: "Status", "Authentication", "Users" and "List of files"
7)Pagination: Angular UI Bootstrap - Pagination Directive can be used for this:
data-pagination=""
data-num-pages="numPages()"
data-current-page="currentPage"
data-max-size="maxSize"
data-boundary-links="true"
Then in controller you can compute numbr of pages based on records that are pulled divided by how many records should be per page.
forked from yjadaa/EndpointCodeExercise
hajakif/EndpointCodeExercise
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
AngularJS, Bootstrap, Node.js and MySQL
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published