Web Services for Rotaract Sarayat El-Maadi's App to be used by the clubs members.
- Please refer to the Readme File in the Database Repo, you can find it Here
- These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You will need to Install:
After Installing all the programs and cloning the repo:
NOTE: You should install the Sql server first and follow all the steps in The Database's Repo ReadMe
- Setting Up The Server
- Open Eclipse.
- Choose File -> Import -> Maven - > Existing Maven Project
- Choose the Folder containing the repo then finish.
- Choose From the Toolbar -> Window -> Show View -> Servers
- Create a new server -> Choose TomCat v9.0 then follow instructions and finish.
- Double click on newly created server.
- Open Launch Configuration -> ClassPath -> Add External Jars
- Choose Sqljdbc4-4.0.jar that you already downloaded
- Click Apply -> Ok
- Set the Port Numbers for the server to the following values then save:
* tomcat Admin Port -> 7005
* HTTP/1.1 -> 7070
* AJP/1.3 -> 7009
- Setting Up The ClassPath
- Right click on the project.
- Choose BuildPath - > Configure Build Path
- Choose Add Library -> Maven Dependencies
- Choose Add Library -> JRE System Library
- Choose Add Library -> Apache Tomcat v9.0
- Choose Apply then Click on Java Compiler
- Enable Project Specific Settings - > Set Compiler Compliance Level to 1.8 then Apply
- If prompted to rebuild the workspace then accept.
- Move to Project Facets
- Tick on:
* Dynamic Web Module -> 4.0
* Java -> 1.8
* Javascript -> 1.0
* JAX-RS -> 2.1
- From the right corner select Runtimes.
- Tick the Apache Tomcat v9.0 then click Apply.
- Setting Up the Database Connection
- In Eclipse, Choose Window -> Show View -> Package Explorer
- Navigate to DB
- Inside DBManager.java
Change the String db_server From:
-"jdbc:sqlserver://AMRKHALED97;"
to:
-"jdbc:sqlserver://YOUR_SQL_SERVER_NAME;"
- Right Click on the project -> Run As -> Run on Server
- If the server gives an Error of timeout then please increase its maximum timeout from the servers view and try again.
- If all goes well a page with 404-Not found should appear No Worries it means we are on the right track
The Link Should Look Like This: http://localhost:7070/Sarayat/api - Add the word api after the link and press enter, the sentence: "Server is running" should appear.
- If the Sentence does not appear then please review your installation steps and review the classpath.
For testing our APIs, Postman is used and you can find the collection ready for import Here
Please don't forget to clone the Database Repo from Here
- Maven - Dependency Management
- Java - JRE1.8_211
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md file for details