Efficient, easy-to-use, powerful API management platform (with eggs included)

Source: Internet
Author: User
Tags install mongodb yum install mongodb install node

Preface Guide

The requirements of the actual environment can be said: Only you did not realize that the levy for the actual development, testing, production and other environments, need to use a variety of interfaces up to dozens of, or even hundreds, therefore, must need a unified management of the tool platform to unify the management of such interfaces, so as to facilitate subsequent use.
So today to briefly introduce the Open Source Interface management tool: Yapi

Platform Introduction

Official website: https://yapi.ymfe.org/index.html
GitHub Address: Https://github.com/YMFE/yapi

Yapi is an efficient, easy-to-use, powerful API management platform designed to provide more elegant interface management services for development, products, and testers. Can help developers easily create, publish, maintain API,YAPI also provide users with a good interactive experience, developers only need to take advantage of the platform provided by the interface data writing tools and simple Click operation can be implemented interface management.

Characteristics

1, based on JSON5 and Mockjs define interface return data structure and document, efficiency increase multiple times
2, flat authority design, that is, to ensure the management of large enterprise-level projects, but also ensure the ease of use
3, similar to postman interface debugging
4. Automated testing, support for Response assertions
5, Mockserver In addition to support ordinary random mock, but also increased the mock expected function, according to the set request filtering rules, return the expected data
6, Support Postman, har, swagger data import
7, free open source, intranet deployment, information is no longer afraid of leaking

Installation Environment Introduction and deployment

Environmental Requirements (CentOS installation environment)
Nodejs (7.6+)
MongoDB (2.6+)

Install node. js
[[email protected] ~]# curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -[[email protected] ~]# yum -y install nodejs[[email protected] ~]# yum install gcc-c++ make -y

Installing the Configuration Mogodb database
[[email protected] ~]# cd /etc/yum.repos.d/[[email protected] yum.repos.d]# vim mongodb.repo[mongodb]name=MongoDB Repositorybaseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/gpgcheck=0enabled=1[[email protected] ~]# yum install mongodb-org -y
Start the service
[[email protected] ~]# service mongod startStarting mongod (via systemctl):    [  确定  ][[email protected] ~]# ps -ef|grep mongodmongod 10549 1 0 11:00 ? 00:00:00 /usr/bin/mongod -f /etc/mongod.confroot 10563  1291 0 11:00 pts/0  00:00:00 grep --color=auto mongod[[email protected] ~]# lsof -i :27017COMMAND PID  USER  FD  TYPE DEVICE SIZE/OFF NODE NAMEmongod 10549 mongod 8uIPv4 28721 0t0 TCP localhost:27017 (LISTEN)

Create a database
[[email protected] ~]# mongoMongoDB shell version: 2.6.12connecting to: testWelcome to the MongoDB shell.For interactive help, type "help".For more comprehensive documentation, see       http://docs.mongodb.org/Questions? Try the support group       http://groups.google.com/group/mongodb-user> use yapiswitched to db yapi> db.wong.insert({"name":"kenny wong"})WriteResult({ "nInserted" : 1 })> show dbsadmin  (empty)local  0.078GByapi   0.078GB> db.addUser(‘yapi‘,‘yapi321‘)WARNING: The ‘addUser‘ shell helper is DEPRECATED. Please use ‘createUser‘ insteadSuccessfully added user: { "user" : "yapi", "roles" : [ "dbOwner" ] }
Install and configure the Yapi tool to install the Yapi software
[[email protected] ~]# mkdir yapi[[email protected] ~]# cd yapi/[[email protected] yapi]# git clone https://github.com/YMFE/yapi.git vendors如果下载较慢,可直接下载压缩包进行解压

[[email protected] yapi-master]# cp config_example.json ../config.json [[email protected] yapi-master]# vim config.json {"port": "3000","adminAccount": "[email protected]","db": {"servername": "127.0.0.1","DATABASE":  "yapi", "port": 27017,"user": "yapi","pass": "yapi321"},"mail": { "enable": true,"host": "smtp.163.com", "port": 465, "from": "***@163.com", "auth": { "user": "***@163.com","pass": "*****"}}}

[Email protected] yapi-master]# npm install--production--registry https://registry.npm.taobao.org

Start the service


Web Login


Specific back interface and project operations, you can refer to the official documentation

Gift Book Benefits

The content of this book is logically divided into three parts, according to from the theory to the realization, and then to the practice of the idea of writing.
Firstly, the background knowledge of distributed cache is introduced, and the two key words "distributed" and "cached" in this book are comprehensively reviewed, which is the basis of the following chapters.
The second part introduces the industry mainstream cache, pay attention to its principle and implementation, including Ehcache, Memcached, Redis, Tair, Evcache, Aerospike and other six cache or class cache system;
The last part discusses the practice of caching in Internet system, starting with five typical Internet applications, such as advertising, social, news, e-commerce, marketing and so on, analyzing the performance stability problems they face and how to solve these problems with distributed cache.

Book Delivery Rules

1, text at the end of the message you have encountered in the work of the "pit" problem, how to solve it? Or why you need the book? Featured message likes (no likes) the first two people send out a copy
2, in a selection of messages randomly selected a lucky person sent out a (usually more attention to the public, more advice, praise, forwarding of small partners opportunities will be greater)
2, because only select 100 messages, so not more than 30 words or irrelevant messages will not be selected on
3, the event is limited to public attention to the participation of fans
4, the award-winning partners in a business day inside the public number of the background to send mobile phone number + name + delivery address, overdue is automatically considered abandoned
5, the event deadline March 17, 2017 12:00

Sweep code follow the public number to participate in the event

Efficient, easy-to-use, powerful API management platform (with eggs included)

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.