Class: AutoREST::Server

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/autorest/server.rb

Overview

Note:

This server is designed to work with different database adapters like SQLite, MySQL, PostgreSQL, and Oracle, as provided by the AutoREST framework.

The main server instance for AutoREST.

This class sets up a Sinatra web server that acts as the interface for interacting with the AutoREST API. It handles requests related to various database operations such as querying, inserting, updating, and deleting rows.

Examples:

Starting the server

AutoREST::Server.new(db_conn).run!

See Also:

Instance Method Summary collapse

Constructor Details

#initialize(db_conn) ⇒ Server

Initializes a new AutoREST::Server instance.

Parameters:



21
22
23
24
# File 'lib/autorest/server.rb', line 21

def initialize(db_conn)
    super()
    @db_conn = db_conn
end