Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mtheoryx/simple-server
Quick server for testing networking
https://github.com/mtheoryx/simple-server
Last synced: 13 days ago
JSON representation
Quick server for testing networking
- Host: GitHub
- URL: https://github.com/mtheoryx/simple-server
- Owner: mtheoryx
- Created: 2017-08-17T14:05:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-17T18:39:00.000Z (about 7 years ago)
- Last Synced: 2024-10-20T01:14:20.345Z (18 days ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-server
Spin up a simple node server on your Mac host, and run a script
to verify your Mac host can be reached from within a Docker container## Install
Clone this repository
```bash
git clone https://github.com/mtheoryx/simple-server.git && cd simple-server
```Install npm dependencies
```bash
npm i
```## Usage
Spin up the node server in a terminal
```bash
npm start
```Run the test script
```bash
./test-host.sh
```## Results
On success, results will read:
```bash
Success! Connected to host alias 192.168.65.1 from inside container!
Success! Connected to host alias docker.for.mac.localhost from inside container!
```You can also see that it's successful since there will be 2 more logs of `Got request!` from the node server.
On failure, results will read:
```bash
Failure! Not able to connect to host alias 192.168.65.1 from inside container!
Failure! Not able to connect to host alias docker.for.mac.localhost from inside container!
```This could mean your node server is not running, or your Docker for Mac configuration is broken.