Coder Social home page Coder Social logo

tiny-web-server's Introduction

README

编译源程序:项目目录下 gcc -o webserver webserver.c -lpthread

运行源程序:项目目录下 ./webserver

访问方式:
1. 网站登录名为3150102238,密码为2238
2. 浏览器地址栏中输入 127.0.0.1:2238/test.txt 访问纯文本文件
3. 浏览器地址栏中输入 127.0.0.1:2238/noimg.html 访问不包含s图片的HTML文件
4. 浏览器地址栏中输入 127.0.0.1:2238/test.html 访问包含图片和文本的HTML文件

项目文件组织结构:
1. webserver.c是服务器程序的源文件
2. webserver是服务器程序在Linux平台下的可执行文件
3. file目录包含了服务器的静态文件:
    (1) file/txt/test.txt是纯文本文件
    (2) file/img/logo.jpg是图片文件
    (3) file/html/noimg.html是不包含图片的HTML文件
    (4) file/html/test.html是包含图片的HTML文件

tiny-web-server's People

Contributors

vegetabledogg avatar

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.