SEARCA's contacts web application (Frontend)
- Apache
- NodeJS >= v8.9.4
- Yarn
1.) Install Contact's database API
2.) Clone this repository and checkout to develop
branch to see the latest fetures and updates
git clone https://github.com/SEARCAPhil/contacts_web.git
git checkout -b develop
3.) Install dependencies
yarn install
4.) Bundle assets
webpack
5.) Open your prefered browser and navigate to
|- src (main) - All your files must reside here
|--- assets
|------ css
|------ fonts
|------ img
|--- components
|----- your-component (Sample custom component)
|--------- actions (CRUD Operations)
|------------- create.js
|------------- retrieve.js
|------------- update.js
|------------- delete.js
|------------- [ . . . ]
|---------- index.styl (Custom style)
|---------- index.js (Component main entry file)
|--- pages (different pages loaded to DOM by routers)
|--- services (AJAX calls)
|--- routers (Defines routing mechanism)
|--- utils (general Classes that could be used anywhere)
|- www - This will be generated after bundling the application by running
webpack
Note: You must have an active account in Docker to download the application
1.) Docker
2.) Docker Compose
- Web APP : http://localhost:8081
1.) After you cloned the repository, make sure to change your current working directory.
cd contacts_api
2.) Build the image
docker-compose up -d
3.) Get the the list of all running containers and choose the contacts_web_node
docker ps -a
4.) Enter the app's console
docker exec -ti container_id_here bash
5.) Change configuration in config/
directory
6.) npm run start
to start the web server
7.) Navigate to http://localhost:8081
You MUST register your application in azure portal and place and change default value of 'config/adal.js' as necessary
IMPORTANT
You might need to change the [volume] part in
build_files/Dockerfile
depending on your Operating System.
NOTES: Docker only allow few folders that could be mount into the volume or else you will receive a permission denied error and you might need to copy the whole directory for this to properly work.
If you are usingXAMPP
in MacOS, please go toDocker > preferences > File Sharing
and add new entry/Applications/XAMPP/xampp/htdocs
.
This project adheres on StandardJS rules.
To check, please run 'npm run check'