Code Monkey home page Code Monkey logo

awk_httpd's Introduction

AWK HTTPD

GNU AWK HTTP Server Scripts

AWK_HTTPD SCREENSHOT

Install GNU AWK (if needed)

Please install GNU AWK if not yet installed on your environment

# for Mac OS
brew install gawk

# for Ubuntu,Debian apt users
sudo apt-get install gawk

# for CentOS,Fedora,Oracle Linux,Red Hat Enterprise Linux
sudo yum install gawk

Usage

Assuming GNU AWK is installed on your environment, you're ready to run awk_httpd. Simply checkout awk_httpd repository and run the httpd. Default port and document root directory are 8080 and ./ respectively.

$ git clone [email protected]:yokawasa/awk_httpd.git  
Initialized empty Git repository in github/awk_httpd.git/
remote: Counting objects: 45, done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 45 (delta 11), reused 0 (delta 0)
Receiving objects: 100% (45/45), 13.99 KiB, done.
Resolving deltas: 100% (11/11), done

$ cd awk_httpd

$ ls -1 
LICENSE
README.md
httpd.awk
httpd.igawk
img
pages

$ gawk -f ./httpd.awk
$ curl http://localhost:8080/pages/

There is an igawk version GNU AWK HTTPD, httpd.igwk. This is basically the same as httpd.awk except parameter options that you can give GNU AWK HTTPD to change default configuration such as port and root document directory

$ igawk -f httpd.igawk -h
Usage: httpd.igawk [-p port] [-d docroot] [-h]
Options:
  -p port    : define server port (default: 8080)
  -d docroot : define document root (default: "./")
  -h         : list available command options

$ igawk -f httpd.igawk -p 8888 -d ./pages
$ curl http://localhost:8888/pages/

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/awk_httpd.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.