A lightweight rest server

Source: Internet
Author: User

Restserver Direct Publishing database provides methods for JSON format

Restserrestserver Direct Publishing database for JSON format support Mysql,sqlserver,oracle Direct Publish as Rest service, return JSON format Palace client

Unzip after downloading the file

Restserver is a quick rest server for publishing database data directly to JSON format for other places where JSON-formatted data is needed. This program is free and the code is paid for. 1.0.0.22 supports all table data returns as well as table data condition returns.

Usage Environment:

1) Server: Windows Xp,7,8,10,windows server 2003,2008,2012.

2). NETFramework 4.0.

3) Database: Oracle 9I,10G,11G,MSSQL2000,2005,2008,2012,MYSQL5 above.

1) Unzip the software to the appropriate directory. After decompression, there are mainly the following files:

2) install. NET Framework4.0 (go to Microsoft Official website or Web search.) )

3) Configure the configuration file, the configuration file in the directory RestServer.exe.config use Notepad to open the editing changes. Just modify the content below the Configuration/appsettings configuration section (it is a good idea to make a copy backup before you modify it) and the configuration file is described below:

<add key= "HOSTNAME" value= "localhost"/><!--server name--

<addkey= "Port" value= "9001"/><!--RESTF Service Port--

<add key= "DBTYPE" value= "MYSQL"/><!--oracle,mssql,mysql-->

<addkey= "dbconstring" value= "userid=root; Host=localhost;database=db_carmanager;password=root "/>

<!--[SQL]: Data source= 192.168.0.21; Initial Catalog = testtable; User Id = sa; Password = 123456;-->

<!--[ORACLE]: DataSource = Data SOURCE=CARORCL; Persist Security info=true; USERID=ZCB; Password=zcb-->

<!--[MySQL]: userid=root; Host=localhost;database=db_carmanager;password=root-->

<add key= "TABLES" value= "T_log,t_car"/> <!--t_test, split---

A) hostname is the current host name, ID address, or domain name

b) port is required to use the ports, please use the system is not used otherwise will create failure.

c) DbType for database type must be Oracle,mssql or MySQL, corresponding to use Oracle database, Mssqlserver,mysql database.

d) dbconstring for the database, please refer to the sample below to configure according to DbType type.

4) Start the software note Win7 above system including server 2008 above system please use right-click Administrator to execute, otherwise it will start failure. After successful startup, you will be prompted with the following:

Indicates that the service has started successfully. Then we can enjoy it.

1. Start using

It can be used after successful start-up. For example, the previous section was configured with T_log and T_car two sheets

At this time we can enter the following content in IE to operate.

1) All contents of the query table are returned in JSON, input http://localhost:9001/rest/t_car/query we can see the following results in the browser:

2) We need to query the target, such as carno= "Mountain A23392" This time we can make the following query: http://localhost:9001/rest/t_car/query/carno=carno= "Mountain A23392" The browser appears as follows:

Of course, the side can support the where statement in the SQL statement for the combined query. This is no longer a detailed explanation.

http://download.csdn.net/detail/devgis/9251269

or Baidu network disk: Http://pan.baidu.com/s/1c0fpgeW

A lightweight rest server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.