Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
mock-server
Advanced tools
Readme
Your friendly mock server
Node server that easily allows for development and testing of SPA application running against production services.
Server mode allows for setup of simple testing servers that eases the testing process for features that are currently under development.
git clone git@github.com:walmartlabs/mock-server.git
heroku create
heroku config:add MOCK_REPO=repoAddress
mock-server can be configured to access private git repositories through the GIT_SSH
, MOCK_KEY
,
and MOCK_PUB
environment variables.
$ heroku config:add \
GIT_SSH="/app/git_ssh.sh" \
MOCK_KEY="`cat ~/.ssh/id_rsa`" \
MOCK_PUB="`cat ~/.ssh/id_rsa.pub`"
Github automatic updates are achieved through github push receive hooks combined with a githubpub publisher.
http://$server/githubpub/$group
$ heroku config:add \
PUBNUB_CHANNEL=channelName \
PUBNUB_SUBSCRIBE_KEY=subscribeKey
A public gitpubnub instance is available at https://secure-reef-1619.herokuapp.com/
with. This is
public so conflict may occur between channel names and push events sent through this service may
be read by anyone reading this document. This is not recommended for private project use.
Example web hook: https://secure-reef-1619.herokuapp.com/githubpub/channelName
Subscribe Key: sub-c-1c0b5d78-eb3e-11e1-9de3-61dd1d151c11
mock-server uses the same config as the Campfire heroku addon. If enabled mock-server will utilize the same config as the addon. Otherwise the following environment variables need to be configured.
$ heroku config:add \
DEPLOYHOOKS_CAMPFIRE_API_KEY=apiKey \
DEPLOYHOOKS_CAMPFIRE_ROOM=room \
DEPLOYHOOKS_CAMPFIRE_SSL=1 \
DEPLOYHOOKS_CAMPFIRE_URL=campfireServerName
In either case these mock-server specific vars need to be set:
INSTANCE_NAME
: Name reported in campfire notifications. This can be any value but is generally
set to the heroku server name.CAMPFIRE_QUIET
: Define to decrease the number of campfire notifications from the instanceMock-server comes with support for node build systems out of the box but any build system may be used if binaries are available. For more information on how to include additional binaries in the package, see the Heroku build pack documentation. Note that mock-server requires the node build pack so running additional build packs on the sytem will require the use of the multi build pack.
An example project has been setup here.
FAQs
Your friendly mock server
The npm package mock-server receives a total of 125 weekly downloads. As such, mock-server popularity was classified as not popular.
We found that mock-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.