Skip to content

Commit

Permalink
Merge pull request #30 from oconnedk/master
Browse files Browse the repository at this point in the history
Added basic README including how to install and run the site locally
  • Loading branch information
felixge committed Feb 3, 2019
2 parents e31871f + 29a1ec1 commit d9b2950
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
!/public/css !/public/css


*.un~ *.un~
# don't store user's override file in git
docker-compose.override.yml
53 changes: 53 additions & 0 deletions README.md
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,53 @@
nodeguide.com
=============

Local installation
------------------

```bash
git clone git@github.com:felixge/nodeguide.com.git
cd nodeguide.com
```

### Viewing the Guide

#### With Docker

If you don't know what Docker is, then it will be easiest for you to view the **Without Docker** instructions, below.

If you do not have a webserver (Apache/ Nginx) running, you will probably have port 80 available, in which case just run:

```bash
docker-compose up
```

If, however port 80 is already taken by a webserver (typical for a development environment), you will see an error like this: `Error starting userland proxy: listen tcp 0.0.0.0:80: listen: address already in use`.
In which case, you can use the "override" file to make it use a different port (e.g. 8080 if that is available):

```bash
cp docker-compose.override.yml.dist docker-compose.override.yml
docker-compose -f docker-compose.override.yml up
```

#### Without Docker - Debian/ Ubuntu

You can run these commands to view the guide locally, temporarily.

```bash
sudo apt install pandoc # if you don't yet have pandoc installed
make
```

|Technology|Command Line|
|---|---|
|**PHP**|`php -S localhost:8000`|
|**Python**|`python -m SimpleHTTPServer 8000`|
|**Python - twistd**|`twistd -n web -p 8080 --path .`|
|**Ruby**|`ruby -run -ehttpd . -p8080`|

Then visit: [http://localhost:8000](http://localhost:8000)

### See Also

- [Docker](https://www.docker.com/)
- [Pandoc](https://pandoc.org/installing.html)
4 changes: 4 additions & 0 deletions docker-compose.override.yml.dist
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,4 @@
web:
build: .
ports:
- 8080:80 # override port 80 which will typically be used for local Apache/ Nginx

0 comments on commit d9b2950

Please sign in to comment.