Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A RESTful API using Poco C++ Libraries.

License

NotificationsYou must be signed in to change notification settings

edson-a-soares/poco_restful_webservice

Repository files navigation

LicenseBuild Status

Overview

This is a totally functional RESTful API built using the free version ofPoco C++ Libraries.

Disclaimer

  1. There is aPOCO PRO C++ Frameworks and it has its own support to RESful APIs development. Checkthis out, if you want to know more about it.

  2. This application is just another way to build a application using only the free part of this amazing library. Be aware this is not meant to be a blueprint, the correct way, even worse, the best way to build an API usingPoco C++ Libraries. On the contrary, it was built purely for fun and curiosity after I have used this amazing C++ framework in a project I worked in. Surely, there are plenty different ways to build a similar project usingPoco C++ Libraries. However, I hope this can be useful offering some guidance for those trying to build a non trivial application usingPoco C++ Libraries.

Requirements for running it locally

  • Virtualized environment

    The development environment is built using virtualization. So, for running it locally you just need to haveVagrant,VirtualBox andPuppet installed in your computer.

    Currently, the project has been using the following versions of the tools aforementioned:

    • Vagrant 2.0
    • VirtualBox 5.1
    • Puppet 4.8
  • On your own

    Currently, the project has the following dependencies:

    • CMake 3.7.2
    • GCC-6 and G++-6
    • Google's C++ test framework
    • Poco 1.8.1
    • MySQL

Running the project

After havingVagrant,VirtualBox andPuppet installed you can run the web service locally through a fewAnt Tasks at the root directory of the project as follows:

Managing application environment

For making the environment available locally:

ant -propertyfile dev.properties setup_environment

or, usingVagrant directly applying this command on the root directory of the project:

vagrant up

For destroying the environment with everything:

ant -propertyfile dev.properties destroy_environment

or, usingVagrant directly applying this command on the root directory of the project:

vagrant destroy
Managing application database

For making the database available:

ant -propertyfile dev.properties create_schemaant -propertyfile dev.properties init_schema

For destroying the database:

ant -propertyfile dev.properties drop_schema
Managing the development process
ant -propertyfile dev.properties create_build_directoryant -propertyfile dev.properties clean_build_directoryant -propertyfile dev.properties build_projectant -propertyfile dev.properties compile_projectant -propertyfile dev.properties run_tests

Usage

After having run the project you will be able to make requests to the API.For doing this, use aTerminal tool likecUrl or anyREST Client Tool likeARC orPostman.
You reach the service at the IP address192.168.1.100:9090.

Running Requests and Responses

For seeing a complete list of API resources and how to make requests and responses consult the APIdocumentation.

Standards and Style

This project do not follow any specificCoding Style Guidelines or Standard. But, it has been influenced byGoogle C++ Style Guide,PPP Style Guide andApplied Informatics C++ Coding Style Guide itself.

Useful links


[8]ページ先頭

©2009-2025 Movatter.jp