All Projects → SensitiveMix → node-mock-factory

SensitiveMix / node-mock-factory

Licence: MIT license
🐋 node-mock-factory

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-mock-factory

juno-agent
juno-agent
Stars: ✭ 46 (+76.92%)
Mutual labels:  configuration-management
kickstart
Agentless configuration manager in Bash
Stars: ✭ 71 (+173.08%)
Mutual labels:  configuration-management
configster
Rust library for parsing configuration files
Stars: ✭ 19 (-26.92%)
Mutual labels:  configuration-management
DeployMachineLearningModels
This Repo Contains Deployment of Machine Learning Models on various cloud services like Azure, Heroku, AWS,GCP etc
Stars: ✭ 14 (-46.15%)
Mutual labels:  configuration-management
delta reporting
Promise reporting portal using CFEngine Community
Stars: ✭ 13 (-50%)
Mutual labels:  configuration-management
observer-spy
This library makes RxJS Observables testing easy!
Stars: ✭ 310 (+1092.31%)
Mutual labels:  mocks
aem-stubs
Tool for providing sample data for AEM applications in a simple and flexible way. Stubbing server on AEM, no separate needed.
Stars: ✭ 40 (+53.85%)
Mutual labels:  mocks
libconfini
Yet another INI parser
Stars: ✭ 106 (+307.69%)
Mutual labels:  configuration-management
puppet-st2
Puppet Module to install and configure StackStorm, IFTTT for Ops
Stars: ✭ 20 (-23.08%)
Mutual labels:  configuration-management
mockingbird
🐦 Decorator Powered TypeScript Library for Creating Mocks
Stars: ✭ 70 (+169.23%)
Mutual labels:  mocks
netcfgbu
Network Configuration Backup
Stars: ✭ 93 (+257.69%)
Mutual labels:  configuration-management
jcliff
Manage JBossAS 7/EAP6/Wildfly with modular configuration files from command line, puppet, ansible, chef, etc.
Stars: ✭ 42 (+61.54%)
Mutual labels:  configuration-management
cassem
(WIP) A distributed Configuration Center Application.
Stars: ✭ 23 (-11.54%)
Mutual labels:  configuration-management
DazzleConf
Incredible configuration library
Stars: ✭ 34 (+30.77%)
Mutual labels:  configuration-management
standalone-configuration-management
Basic examples of how to use each of chef, puppet, salt and ansible as standalone configuration management systems.
Stars: ✭ 14 (-46.15%)
Mutual labels:  configuration-management
SeLite
Automated database-enabled navigation ✔️ of web applications
Stars: ✭ 34 (+30.77%)
Mutual labels:  configuration-management
sitri
Sitri - powerful settings & configs for python
Stars: ✭ 20 (-23.08%)
Mutual labels:  configuration-management
challenges-chef
📖 Challenges Your Chef Skills By Solving Real Questions.
Stars: ✭ 27 (+3.85%)
Mutual labels:  configuration-management
hesperides
Configuration management tool providing universal text file templating and properties editing through a REST API or a webapp (backend part)
Stars: ✭ 35 (+34.62%)
Mutual labels:  configuration-management
ansible-concourse
An ansible role to manage Concourse CI
Stars: ✭ 22 (-15.38%)
Mutual labels:  configuration-management
                              __             ____                  __
   ____ ___   ____   _____   / /__          / __/  ____ _  _____  / /_  ____    _____   __  __
  / __ `__ \ / __ \ / ___/  / //_/ ______  / /_   / __ `/ / ___/ / __/ / __ \  / ___/  / / / /
 / / / / / // /_/ // /__   / ,<   /_____/ / __/  / /_/ / / /__  / /_  / /_/ / / /     / /_/ /
/_/ /_/ /_/ \____/ \___/  /_/|_|         /_/     \__,_/  \___/  \__/  \____/ /_/      \__, /
                                                                                     /____/

CircleCI Coverage Status

Known Vulnerabilities

Standard - JavaScript Style Guide

light weight mock factory for taking advantage of the built-in phoenix mock service in node v6.8.0.Focus on Automatic Generation.

Installation

Greenkeeper badge

git clone [email protected]:tools/mock_server.git

Install dependencies:

npm install

Usage

Initialize phoenix mock plugin with mock cfg, with the given options.

Options:

  • npm run mock Generate Mock Server
  • npm run clean Clean Mock Server

Template Config

{
    'PATH':'./src/mocks',
    'PORT':'9001',
    "SERVICES":[
    {
      "name": "authorization",
      "Handlers": [
        {
          "method": "GET",
          "resHeader": "HTTP/1.1 200 OK",
          "resContent": "{ succeed: true,msg: ok }"
        },
        {
          "method": "POST",
          "resHeader": "HTTP/1.1 200 OK",
          "resContent": "{ succeed: true,msg: ok }"
        },
        {
          "method": "GET--a=b.mock",
          "resHeader": "HTTP/1.1 200 OK",
          "resContent": "{ succeed: true,msg: ok }"
        }
      ]
    }
    ]
}

Options:

  • method Request Method
  • GET--a=b.mock Request GET /hello?a=b
  • resHeader Response Header
  • resContent Response Content

POST ACTION

  • request
curl -X POST -D { hello:'world' } -H "<prefix>/api/v1/login"
  • config
{
    "name": "api/v1/login",
    "Handlers": [
        {
            "method": "POST--Hello=World",
            "resHeader": "HTTP/1.1 200 OK",
            "resContent": "{ succeed: true,msg: ok }"
        }
    ]
}
  • response

http status 200

{
    succeed: true,
    msg: ok
}

GET ACTION

  • request
curl -X GET -H "<prefix>/api/v1/login?hello=world"
  • config
{
    "name": "api/v1/login",
    "Handlers": [
        {
            "method": "GET--Hello=World",
            "resHeader": "HTTP/1.1 200 OK",
            "resContent": "{ succeed: true,msg: ok }"
        }
    ]
}
  • response

http status 200

{
    succeed: true,
    msg: ok
}

Deployment

sneaky d dev

LICENSE

MIT License

Copyright (c) 2017 Jack Sun

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].