RESTFeel: 一个企业级的API管理&测试平台。RESTFeel帮助你设计、开发、测试您的API

RESTFeel

RESTFeel: 一个企业级的API管理&测试平台。RESTFeel帮助你设计、开发、测试您的API。

功能简介:

  • 请求生成器-使HTTP请求轻松。
  • 请求树以树的形式组织请求。
  • 合作-添加团队成员,管理多个项目。
  • PDF报告-生成项目状态报告PDF格式。
  • 历史-查看历史/活动日志。
  • 自定义的时间间隔运行API项目。
  • SendGrid - SendGrid集成发送通知。
  • 云部署-它可以部署在任何服务器上,也可以用来作为一个基于云的托管Web应用程序。
  • 私人-安装在您的环境和完全拥有它。与你的团队一起在你的私人网络中工作。
  • 数据库-存储在您的数据库中的一切。
  • swagger API文档生成。
  • 标签-标签提供了一个有用的方式来组合相关的要求。
  • 安全,访问控制,通知机制等。
RESTFeel接口测试平台
RESTFeel接口测试平台

MongoDB configuration:

Building From Source

Prerequisites
  • JDK 7 or later

  • Maven 3.0+

  • Gradle 2.4 (Optional)

  • MongoDB 3.x

Build
mvn clean install
Run
mvn spring-boot:run
Access

The build file is configured to download and use an embedded Tomcat server. So the application should be up and running by using just two commands mentioned above. Once the server is started, the application can be accessed using http://localhost:8080.

Default login email / password : rf@example.com / rf
Debug
mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"

Note : To avoid java.lang.OutOfMemoryError: PermGen space, use the following command:

MAVEN_OPTS="-XX:PermSize=256m -XX:MaxPermSize=512m" mvn spring-boot:run 

Go to src/main/resources/env-development.properties and update mongodb properties. Here is how the sample configuration looks like:

mongodb.name=restfiddle

mongodb.host=localhost

mongodb.port=27017

mongodb.username=

mongodb.password=
Steps to re-build the database:
1. Stop RESTFiddle server, if running.
2. Start MongoDB, if not running.
    Here is the command I use : "C:\Program Files\MongoDB\bin\mongod.exe" --dbpath C:\Users\ANUJA\Documents\restfiddle\data
3. Connect to MongoDB.
    Here is one of the ways to connect to MongoDB : 
    Go to "C:\Program Files\MongoDB\bin" folder and run "mongo" command.
    Then run "use restfiddle" command and finally "db.dropDatabase()" command to delete the existing RESTFiddle database.
    Note : you will see following message on the command prompt : { "dropped" : "restfiddle", "ok" : 1 }
4. Start RESTFiddle application (mvn spring-boot:run) - This will create and initialize the database.
Steps to recover database:
Sometimes MongoDB doesn't start and shows message:
        old lock file: C:\Users\ANUJA\Documents\restfiddledata\data\mongod.lock. probably means unclean shutdown
Run repair operation to recover your database
    "C:\Program Files\MongoDB\bin\mongod.exe" --dbpath C:\Users\ANUJA\Documents\restfiddledata\data --repair
Most likely, your data will be repaired with the --repair option. In case it doesn't, delete the mongod.lock file and then run the above --repair command.

MongoDB配置数据库用户名密码

Step1.首先,切换到admin db (schema):

> use admin;
switched to db admin

Step2.在該 schema 下面設置用戶名,密碼:


> db.createUser({ user: "root",pwd: "root",customData:{name:"root"},roles:[{ role: "userAdminAnyDatabase",db: "admin" }]})
Successfully added user: {
    "user" : "root",
    "customData" : {
        "name" : "root"
    },
    "roles" : [
        {
            "role" : "userAdminAnyDatabase",
            "db" : "admin"
        }
    ]
}
> db.auth('root','root')
1

Step3.admin中直接给restfiddle权限

var r = 
    {
      "_id": "restfiddle.root",
      "user": "root",
      "db": "restfiddle",
      "credentials": {
        "SCRAM-SHA-1": {
          "iterationCount": 10000,
          "salt": "riZjwBYHvkcV99typ8BRMA==",
          "storedKey": "E2QOruLrBNXD1mlQTX0TQogL/ws=",
          "serverKey": "JEQhfa/5x7+aNzKrFvKRkctXXfQ="
        }
      },
      "roles": [
        {
          "role": "dbOwner",
          "db": "restfiddle"
        },
        {
          "role": "read",
          "db": "restfiddle"
        },
        {
          "role": "readWrite",
          "db": "restfiddle"
        }
      ]
    }


db.system.users.insert(r)


或者

use restfiddle
db.createUser({"user":"jason","pwd":"123456","roles":["dbOwner","read","readWrite"]})

可以看到admin中已经有了jason这个管理员:

> use admin;
> db.system.users.find();

{
  "_id": "restfiddle.jason",
  "user": "jason",
  "db": "restfiddle",
  "credentials": {
    "SCRAM-SHA-1": {
      "iterationCount": 10000,
      "salt": "HZsutqbxGjKVkPcY4305FQ==",
      "storedKey": "bynL9UW9cIf0iPOLo9pGwCFz638=",
      "serverKey": "PRPKH+7dVaKDJ/JE+7ZjQUe3whA="
    }
  },
  "roles": [
    {
      "role": "dbOwner",
      "db": "restfiddle"
    },
    {
      "role": "read",
      "db": "restfiddle"
    },
    {
      "role": "readWrite",
      "db": "restfiddle"
    }
  ]
}

Fetched 4 record(s) in 9ms

參考文章:

《MongoDB极简教程》第一章 安装&环境配置

《MongoDB极简教程》第二章 MongoDB 基本命令

源自开源项目:
RESTFiddle

An Enterprise-grade API Management Platform for Teams. RESTFiddle helps you design, develop, test and release APIs.

Some of the key features of this platform are:

  • Request Builder - Make HTTP requests with ease.
  • Request Tree - Organize requests in the form of a tree.
  • Collaboration - Add as many collaborators as you want from your team and work together on a project.
  • PDF Reports - Generate project status reports in PDF format.
  • Integration - RESTFiddle platform exposes APIs for everything it has.
  • History - Unlimited history/activity log.
  • Scheduler - Run API projects on predefined time intervals.
  • SendGrid - SendGrid integration to send notifications.
  • Cloud Deployment - It can be deployed over any server and can also be used as a cloud based hosted web application.
  • Private - Install it in your environment and own it completely. Work together with your team in your private network.
  • Database - Store everything in your database.
  • Swagger - Access RESTFiddle API documentation using Swagger UI.
  • Tagging - Tags provide a useful way to group related requests together.
  • Open Source - Fork it and build the features of your choice.
  • More - Security, Access Control, Notifications and much more.

A lot of powerful features coming soon!

Who Uses RESTFiddle

The following is a list of companies and projects using RESTFiddle:

Want to be added to this section? Email me at contact at bootsimply dot com.

For Gradle Users:

Build war

Unix :

./gradlew clean war

Windows :

gradlew.bat clean war

Run

Unix :

./gradlew bootRun

Windows :

gradlew.bat bootRun

Debugging in Windows : Add the following to build.gradle file and then run the above command

applicationDefaultJvmArgs = [
    "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"
]

Using MongoDB 3.x

Windows

Download the latest MongoDB version. After kappa release, RESTFiddle has enabled authentication and moved to version 3.0. To start using this, create a configuration file mongo.conf at a location.e.g. F:\restfiddledata. Create mongo.log file for logging e.g. F:\restfiddledata\log\ This is how configuration file looks like:

bind_ip = 127.0.0.1
 
port = 27017
 
quiet = true
 
dbpath=F:\restfiddledata\data0
  
logpath=F:\restfiddledata\log\mongo.log
 
logappend = true

Start MongoDB without authentication.

"C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --config F:\restfiddledata\mongo.conf  

On another command prompt go to C:\Program Files\MongoDB\Server\3.0\bin and type command mongo. This opens Mongo Shell.
Create user here.

use restfiddle
db.createUser({"user":"rf","pwd":"rf","roles":["dbOwner","read","readWrite"]})

Now stop the database and restart it so that it checks for authentication

"C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --auth --config F:\restfiddledata\mongo.conf

Start the RESTFiddle application using the same command as earlier

mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
Mac

Deployment

You can deploy the war file to Tomcat 7.0.52, Jetty, or any other container, as long as it supports servlet 3.0.

Technology Stack

Contribute

You're interested in contributing to RESTFiddle? AWESOME. Here are the basic steps:

Code formatting :
GitHub help :
Google Group :

https://groups.google.com/forum/#!forum/restfiddle

Meetup Group :

http://www.meetup.com/RESTFiddle

Gitter :

https://gitter.im/AnujaK/restfiddle

Code Quality :

https://nemo.sonarqube.org/overview?id=com.restfiddle%3Arestfiddle

Releases

https://github.com/AnujaK/restfiddle/releases

Support

If you need help in setting up RESTFiddle for your Team/Organization, feel free to contact me at this email address.

Copyright and License

Copyright 2015 BootSimply Solutions

Licensed under Apache License, Version 2.0

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,937评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,503评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,712评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,668评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,677评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,601评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,975评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,637评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,881评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,621评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,710评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,387评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,971评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,947评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,189评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,805评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,449评论 2 342

推荐阅读更多精彩内容

  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    wgl0419阅读 6,263评论 1 9
  • 新课程的实施旨在涤荡“应试文化”的污泥浊水,彻底变革传统的非人性的课程。倡导为学生提供多元发展的空间,引导学生“学...
    yinyuelin阅读 203评论 0 1
  • 在我懂人事开始知晓有婆婆、夫家这一类生物存在之后,我经常被洗脑,同时我也脑补各种画面,成功滴将与夫家有关的一切,尤...
    自由译员Scar阅读 344评论 2 2
  • 一个平常的晚自习,我正写着作业。突然间,我的视线看不见了。“怎么回事?”坐在我旁边的小白很疑惑。那些说闲话的...
    尽乔阅读 301评论 0 3