This project is an enterprise-grade URL shortener and bio page application developed with Spring Boot. It provides a robust solution for shortening URLs and creating bio pages for users. The application is designed for scalability and includes features such as analytics, user management, and subscription plans.
Execute the provided **db\_schema.sql** file to set up the necessary tables and schema for the application. This script will also create the required database.
Deploy the generated WAR file to your Tomcat server. Copy the WAR file to the `webapps` directory of your Tomcat installation.
```plaintext
cp target/shorten.war /path/to/tomcat/webapps/
```
***Option 2: Web Interface Upload**
Alternatively, if your Tomcat server provides a web interface for WAR file deployment, follow these steps:
* Access the Tomcat Manager web interface at `http://localhost:8080/manager/html` (replace with your Tomcat server address).
* Log in with your Tomcat manager credentials.
* Navigate to the "WAR file to deploy" section.
* Choose the `shorten.war` file using the file upload button.
* Click the "Deploy" button.
3.**Configure environment variables:**
Set environment variables for cloud-specific settings.
4.**Adjust Tomcat Configuration (Important):**
To ensure proper functionality, it's important to run the application on the root of the servlet container. If you're using Tomcat, add the following line to your `server.xml` configuration file within the `<Host>` section:
6.**Adjust Configuration (Optional):** If you need to customize the application configuration after deployment, you can find the **application.properties** file within the deployed WAR file. THe file can be accesses as :
```plaintext
vi /path/to/tomcat/webapps/your-app/WEB-INF/classes/application.properties