JetBorutoKtorServerApp is a server-side Kotlin application that leverages the Ktor framework to provide RESTful APIs for Boruto, a sample project. The application includes routes to manage data related to Boruto characters and offers endpoints to facilitate CRUD operations on the server.
Dark - Home | Dark - Detail Collapsed | Dark - Detail Expanded | Dark - Search |
---|---|---|---|
Light - Home | Light - Detail Collapsed | Light - Detail Expanded | Light - Search |
---|---|---|---|
- RESTful API: Provides easy-to-use endpoints for CRUD operations on Boruto character data.
- Data Storage: Supports data persistence and retrieval.
- Ktor Framework: Uses Ktor for asynchronous server capabilities.
- Dependency Injection: Implemented with Koin for scalable dependency management.
- Exception Handling: Includes error handling and responses for invalid requests.
- Unit Tests: Tests for core functionalities to ensure reliable operations.
- Kotlin - Primary programming language
- Ktor - Server framework for Kotlin
- Koin - Dependency injection framework for Kotlin
- Exposed - SQL library for data access
- SQLite - Database for local data persistence
- JUnit - Testing framework for unit tests
To set up and run the JetBorutoKtorServerApp locally, follow these steps:
-
Clone the repository:
git clone https://github.com/icanerdogan/JetBorutoKtorServerApp.git
-
Navigate to the project directory:
cd JetBorutoKtorServerApp
-
Build the project:
./gradlew build
-
Run the server:
./gradlew run
The server will start running at http://localhost:8080
.
Once the server is running, you can access the API through HTTP requests using tools like curl
, Postman
, or directly through your application.
Method | Endpoint | Description |
---|---|---|
GET | /characters |
Fetches a list of all characters |
GET | /characters/{id} |
Fetches a character by ID |
POST | /characters |
Adds a new character |
PUT | /characters/{id} |
Updates an existing character |
DELETE | /characters/{id} |
Deletes a character by ID |
Each endpoint returns a JSON response containing the status and data or an error message.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push the branch:
git push origin feature-name
. - Open a pull request.
This project is open-source and available under the MIT License. See the LICENSE
file for more details.