Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
âCITATION.cff file
Found CITATION.cff file -
âcodemeta.json file
Found codemeta.json file -
â.zenodo.json file
Found .zenodo.json file -
âDOI references
-
âAcademic publication links
-
âAcademic email domains
-
âInstitutional organization owner
-
âJOSS paper metadata
-
âScientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Keywords
Repository
đĒ Sleepy Server
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
[Sleepy Server v-0.1.0](https://github.com/ragdata/sleepy-server/releases/tag/v-0.1.0)
Issues đ¸ Documentation đ¸ Releases
A Sleepy Software Testing Utility
If you like this repository, please give it a â (it really does help)
đ Table of Contents
- [Project Overview](#-project-overview)
- [Available Support](#-available-support)
- [Installation](#-installation)
- [Project Supporters](#-project-supporters)
- [Author/Maintainer](#-author--maintainer)
- [Security](#-security)
- [Copyright & Attributions](#-copyright--attributions)
- [License](#-license)
- [Resources](#-resources)
â Project Overview
The Sleepy Server is a simple software testing utility. The server will sleep for the period specified in the incoming request before it responds.
The only API method takes a single parameter:
shell
http(s)://sleepy.server.org/:sleepValue
Where :sleepValue determines the period that the server will wait before sending a response.
The length of the delay is calculated as the :sleepValue multiplied by the valueMultiplier environment variable (which defaults to 1000 - and as such, we can say that the length of the delay is counted in milliseconds)
Docker Image
Use the 'standard' method to launch the Docker Image from the root directory of the project:
shell
docker build -t sleepy:test .
Examples
Example #1
With a :sleepValue of 5 (and the default multiplyer = 1000)
shell
$ date; time http http://localhost:3000/5 -b; date
Wed Nov 16 09:02:02 CET 2022
Woke up after 5 second(s) of sleep!
... 0.35s user 0.15s system 8% cpu 5.655 total
Wed Nov 16 09:02:08 CET 2022
In your terminal window, the scenario might play out like this:
shell
$ docker run --rm -p 3000:3000 -d sleepy:test
$ docker logs -tf agitated_elemental
2022-11-16T08:00:23.621848495Z Sleeping server listening on port 3000
2022-11-16T08:02:03.494774343Z Going to sleep for 5 second(s)!
2022-11-16T08:02:08.498342553Z Wake up! 5 second(s) passed.
Example #2
Simultaneous Requests:
```shell $ date; for I in $(seq 5 -2 1); do \ ((http GET http://localhost:3000/$I -b | cat - && echo -n ' -- ' && date) &) \ done
Wed Nov 16 09:03:47 CET 2022 Woke up after 1 second(s) of sleep! -- Wed Nov 16 09:03:48 CET 2022 Woke up after 3 second(s) of sleep! -- Wed Nov 16 09:03:50 CET 2022 Woke up after 5 second(s) of sleep! -- Wed Nov 16 09:03:52 CET 2022 ```
And in the server logs:
shell
2022-11-16T08:03:47.917399749Z Going to sleep for 5 second(s)!
2022-11-16T08:03:47.923730533Z Going to sleep for 1 second(s)!
2022-11-16T08:03:47.924537943Z Going to sleep for 3 second(s)!
2022-11-16T08:03:48.925443668Z Wake up! 1 second(s) passed.
2022-11-16T08:03:50.925969532Z Wake up! 3 second(s) passed.
2022-11-16T08:03:52.918711537Z Wake up! 5 second(s) passed.
Configuration (Environment Variables)
port- the port on the server will be listening onvalueMultiplier- the multiplier of:sleepValuewhich is used to calculate the length of the delay before the server responds. Leaving this value set to the default of 1000 makes:sleepValueroughly equal to a number of seconds.
đĒ Available Support
Project Resources:
Community Resources
â¤ī¸ Project Supporters
Many Thanks to JetBrains for Their Invaluable Support
Click here to find out about available sponsorship opportunities!
If sponsorship isn't right for you, but you have found my work to be useful in some way,
would you please consider buying me a coffee to help keep me going?
đ§ Author / Maintainer
đ Security
While I always good security practices, 100% security can never be guaranteed in any software package. The Sleepy Server is provided AS IS, and without warranty. You can find more details in the LICENSE file included with this repository.
If you discover any issue regarding the security of this project, please disclose that information responsibly by sending a security advisory. PLEASE DO NOT CREATE AN ISSUE OR DISCUSSION TOPIC. You can read more about this project's security policies HERE
ÂŠī¸ Copyright & Attributions
This project incorporates ideas and / or code crafted by the following talented individuals:
- lbacik/sleeping-server
Copyright (C) 2017 Lukasz Bacik <mail@luka.sh>
GPL Licensed
"We see much further, and reach much higher,
only because we stand upon the shoulders of giants"
âī¸ License
Copyright Š 2023 Darren (Ragdata) Poulton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
đ Resources
If you like this repository, please give it a â (it really does help)
Owner
- Name: Ragdata's Vault
- Login: ragdata-vault
- Kind: organization
- Email: ragdata@users.noreply.github.com
- Location: Australia
- Website: https://ragdata.net
- Twitter: RagdataAU
- Repositories: 1
- Profile: https://github.com/ragdata-vault
A holding space for spring cleaning
Citation (CITATION.cff)
# See: https://citation-file-format.github.io/
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Sleepy Server
message: >-
If you use this software, please cite using the
information provided here
type: software
authors:
- given-names: Darren
family-names: Poulton
email: ragdata@ragdata.dev
orcid: 'https://orcid.org/0000-0001-8986-2886'
affiliation: Redeyed Software
repository-code: 'https://github.com/ragdata/sleepy-server'
url: 'https://ragdata.github.io/sleepy-server'
abstract: >-
A testing utility - the sleepy server will sleep for the period it is told to by the incoming request before responding
license: MIT
GitHub Events
Total
Last Year
Dependencies
- node latest build
- express ^4.18.2