Yeoman generator for http-fake-backend
Build a fake backend by providing the content of JSON files or JavaScript objects through configurable routes.
_-----_
| | .--------------------------.
|--(o)--| | Welcome to the |
`---------´ | phenomenal |
( _´U`_ ) | http-fake-backend |
/___A___\ | generator! |
| ~ | '--------------------------'
__'.___.'__
´ ` |° ´ Y `
Please check the README of »http-fake-backend« to get detailed information about what it’s all about.
This readme only contains the gist of it and mainly describes Yeoman specific things.
Installation
First, install Yeoman and generator-http-fake-backend
using npm (we assume you have pre-installed Node.js 6.0.0 or greater).
yarn global add yo
yarn global add generator-http-fake-backend
npm install -g yo
npm install -g generator-http-fake-backend
Then generate your fake backend server:
yo http-fake-backend
Generating endpoints
yo http-fake-backend:endpoint
Please see detailed info regarding how to adjust your endpoints over here:
https://github.com/micromata/http-fake-backend
Start the server
npm run start:dev
This way the server uses nodemon
to restart itself on changes.
This way you dont have to restart the server in case you changed an endpoint.
Getting To Know Yeoman
Yeoman has a heart of gold. He’s a person with feelings and opinions, but he’s very easy to work with. If you think he’s too opinionated, he can be easily convinced. Feel free to learn more about him.
Related
License
MIT © Micromata
Please be aware of the licenses of the components we use in this project.
Everything else that has been developed by the contributions to this project is under MIT License.
4.0.0 (2018-02-19)
We moved from v2.0.1 to v4.0.0 and skipped v3.x to be on the same major level as the underlying http-fake-backend to avoid confusion.
Bug Fixes
- dependencies: Fix linting errors caused by eslint update (a51aad3)
- dependencies: Revert gulp-mocha to 3.x (b005b7c), closes sindresorhus/gulp-mocha#159
- dependencies: update dependencies (09fb881)
- automatically install with npm if Yarn isn’t available (1fe4844), closes #5
- Remove Gulp and replace Mocha with Jest (#6) (475b466)
- Update dependencies (4df3ba1)
- Update dependencies of generated project (60e1ace)
- update dependencies of the Yeoman generator (f1ff18e)
Chores
- Update required minimum Node version to 6.0.0 (6c32225)
Features
Change engines.node
to >=6.0.0
to reflect the minimum node version which is needed since http-fake-backend 4.0.0.
http-fake-backend 4.0.1
Bug Fixes
- encoding of binary files send via endpoints
http-fake-backend 4.0.0
Bug Fixes
- dependencies: Apply changes of boom update
- dependencies: Update dependencies
Code Refactoring
- Refactor existing codebase
Documentation
- Update required minimum Node version in readme
Features
- Add support for other response content-types, closes #7
- Add support for sending files as response, closes #11
BREAKING CHANGES
- The transitive dependency punycode@2.1.0 needs Node version ">=6".
- The setup.js is divided to multiple files.
Therefore you need to change the import of the setup in your endpoint files
like the following:
// before
const SetupEndpoint = require('./setup/setup.js');
// now
const SetupEndpoint = require('./setup/index.js');
// or:
const SetupEndpoint = require('./setup/');
BREAKING CHANGES
- This project now needs Node 6 or greater.