This is a FastAPI-based project for expanding shortened URLs.
This project is configured to use a development container in Visual Studio Code. Follow the steps below to set up and run the application:
- Install Visual Studio Code.
- Install the Dev Containers extension.
-
Open the Project in VS Code
- Clone the repository to your local machine.
- Open the project folder in Visual Studio Code.
-
Open in Dev Container
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) to open the Command Palette. - Search for and select
Dev Containers: Reopen in Container.
- Press
-
Set Up Environment Variables
- Create a
.envfile in the root directory of the project. - Add the required environment variables to the
.envfile. example:AWS_DEFAULT_REGION=your-region AWS_ACCESS_KEY_ID=your-access-key-id AWS_SECRET_ACCESS_KEY=your-secret-access-key SNS_LEHLAH_EXPAND_NOTIF_ARN=your-sns-arn
- Create a
-
Install Dependencies
- Once inside the dev container, open a terminal in VS Code.
- Run the following command to install the required dependencies:
pip install -r requirements.txt
-
Run the FastAPI Application
- Start the application using the following command:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
- The application will be accessible at
http://127.0.0.1:8000by default.
- Start the application using the following command:
- For more details on the project structure and functionality, refer to the source code and comments.
- If you encounter any issues, please check the logs or contact the project maintainers.