All Projects → oatpp → example-postgresql

oatpp / example-postgresql

Licence: Apache-2.0 license
A complete example of a "CRUD" service (UserService) built with Oat++ and using oatpp ORM with PostgreSQL.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to example-postgresql

Swagger Toolbox
💡 Swagger schema model (in yaml, json) generator from json data
Stars: ✭ 194 (+708.33%)
Mutual labels:  swagger-ui
WarmSearch
🏫 失物招领网站 (SpringBoot + MybatisPlus + JWT) 实现前后端分离项目的后台管理系统
Stars: ✭ 38 (+58.33%)
Mutual labels:  swagger-ui
OpenAPI-Viewer
OpenApi viewer Implemented using Vue
Stars: ✭ 93 (+287.5%)
Mutual labels:  swagger-ui
Restrserve
R web API framework for building high-performance microservices and app backends
Stars: ✭ 207 (+762.5%)
Mutual labels:  swagger-ui
Django Rest Swagger
Swagger Documentation Generator for Django REST Framework: deprecated
Stars: ✭ 2,553 (+10537.5%)
Mutual labels:  swagger-ui
swaggerql
Easily and simply convert SQL database into a REST API with Swagger documentation
Stars: ✭ 40 (+66.67%)
Mutual labels:  swagger-ui
Spring Boot Plus
🔥 Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding. 🚀
Stars: ✭ 2,198 (+9058.33%)
Mutual labels:  swagger-ui
openapi-viewer
Browse and test a REST API described with the OpenAPI 3.0 Specification
Stars: ✭ 85 (+254.17%)
Mutual labels:  swagger-ui
helm-swagger-ui
Helm Chart for Swagger UI
Stars: ✭ 23 (-4.17%)
Mutual labels:  swagger-ui
jeecg
JEECG是一款基于代码生成器的J2EE快速开发平台,开源界“小普元”超越传统商业企业级开发平台。引领新的开发模式(Online Coding模式(自定义表单) - > 代码生成器模式 - > 手工MERGE智能开发), 可以帮助解决Java项目90%的重复工作,让开发更多关注业务逻辑。既能快速提高开发效率,帮助公司节省人力成本,同时又不失灵活性。具备:表单配置能力(无需编码)、移动配置能力、工作流配置能力、报表配置能力(支持移动端)、插件开发能力(可插拔)
Stars: ✭ 2,090 (+8608.33%)
Mutual labels:  swagger-ui
Swagger Bootstrap Ui
Swagger-bootstrap-ui is the Swagger front-end UI implementation, the purpose is to replace the Swagger default UI implementation Swagger-UI, make the document more friendly....
Stars: ✭ 2,816 (+11633.33%)
Mutual labels:  swagger-ui
Flasgger
Easy OpenAPI specs and Swagger UI for your Flask API
Stars: ✭ 2,825 (+11670.83%)
Mutual labels:  swagger-ui
monero-merchant
Monero Merchant is a RESTful API wrapper for the official Monero wallet RPC. This project is mainly for merchants who hope to accept Monero as payment, which is currently the most robust and privacy-oriented cryptocurrency with extremely low transaction fees.
Stars: ✭ 27 (+12.5%)
Mutual labels:  swagger-ui
Gradle Swagger Generator Plugin
Gradle plugin for OpenAPI YAML validation, code generation and API document publishing
Stars: ✭ 197 (+720.83%)
Mutual labels:  swagger-ui
MsCoreOne
MsCoreOne is a simple Ecommerce with using many technologies such as .NET 5, Entity Framework Core 5, React 16.13 with modern Clean Architecture, Domain-Driven Design, CQRS, SOLID, Identity Server 4, Blazor. It will focus on resolving the problems always see in the process to develop projects.
Stars: ✭ 77 (+220.83%)
Mutual labels:  swagger-ui
Drf Yasg
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
Stars: ✭ 2,523 (+10412.5%)
Mutual labels:  swagger-ui
RestDoc
在运行时,使用Javadoc文档注释生成Swagger/OpenAPI规范
Stars: ✭ 63 (+162.5%)
Mutual labels:  swagger-ui
grlc
grlc builds Web APIs using shared SPARQL queries
Stars: ✭ 118 (+391.67%)
Mutual labels:  swagger-ui
spring-boot-jwt-auth
🔑 Sample Spring boot application secured using JWT auth in custom header(X-Auth-Token).
Stars: ✭ 57 (+137.5%)
Mutual labels:  swagger-ui
AutoTablesForRADServer
Automate REST API Development With Auto Tables For RAD Server
Stars: ✭ 31 (+29.17%)
Mutual labels:  swagger-ui

example-postgresql Build Status

A complete example of a "CRUD" service (UserService) built with Oat++ and using oatpp ORM with PostgreSQL.

In this example:

  • How to create CRUD endpoints.
  • How to use oatpp ORM - PostgreSQL example.
  • How to document API with Swagger-UI and OpenApi 3.0.0.

More about Oat++:

Overview

This project is using the following oatpp modules:

Project layout

|- CMakeLists.txt                        // projects CMakeLists.txt
|- src/
|    |
|    |- controller/                      // Folder containing Controller where all endpoints are declared
|    |- db/                              // Folder containing the database client
|    |- dto/                             // DTOs are declared here
|    |- service/                         // Service business logic classes (UserService)
|    |- ServiceComponent.hpp             // Service configuration (port, ObjectMapper, Database)
|    |- SwaggerComponent.hpp             // Configuration for swagger-ui
|    |- AppComponent.hpp                 // Service configuration is loaded here
|    |- DatabaseComponent.hpp            // Database config
|    |- App.cpp                          // main() is here
|    
|- test/                                 // test folder
|- utility/install-oatpp-modules.sh      // utility script to install required oatpp-modules.
|- resources/config.json                 // configuration file with configuration profiles
|- Dockerfile                            // Dockerfile
|- docker-compose.yaml                   // Docker-compose with this service and postgresql

Build and Run

Using CMake

Requires

  • This example also requires the PostgreSQL package installed.

    • On Alpine $ apk add postgresql-dev
    • On Ubuntu $ apt-get install postgresql-server-dev-all

    For more info see oatpp-postgresql/README.md

  • oatpp, oatpp-swagger and oatpp-postgresql modules installed. You may run utility/install-oatpp-modules.sh script to install required oatpp modules.

$ mkdir build && cd build
$ cmake ..
$ make 
$ ./example-postgresql-exe  # - run application.

PostgreSQL is expected running as for dev config profile

In Docker

Dockerfile

$ docker build -t example-postgresql .
$ docker run -p 8000:8000 -e CONFIG_PROFILE='dev' -t example-postgresql

docker-compose

$ docker-compose up

docker-compose will run service with local-docker config profile

After run

Go to http://localhost:8000/swagger/ui to try endpoints.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].