Giter VIP home page Giter VIP logo

dwork-web's Introduction

DWork Web

Project Overview

DWork Web is an experimental web framework designed for simplicity and flexibility.

Project Documentation

You can find the documentation for this project in English or Portuguese.

Creating Your First Website

To create your first website using DWork Web, follow these steps:

  1. Installation: Integrate DWork into your project using the following command in the terminal:

    go get github.com/Diegiwg/dwork-web
  2. Import DWork Web Package: Import the DWork Web package into your Go project:

    package main
    
    import (
        dworkweb "github.com/Diegiwg/dwork-web/dw"
    )
  3. Create App Object: In the main function, create an app object using the MakeApp method:

    func main() {
        app := dworkweb.MakeApp()
    }
  4. Add Routes: Add routes to your website using methods like GET, POST, PUT, or DELETE on the app object. For example, to set up a GET route at /:

    app.GET("/", func(ctx dworkweb.Context) {
        content := `<h1>Your First Page with DWork Web (GO + HTML)</h1>`
        ctx.Response.Html(content)
    })
  5. Start Server: Start the server using the Serve method:

    app.Serve(":8080")

Now you can access http://localhost:8080/ and view your first page.

For a complete example, refer to the basic-site directory.

Examples of Use

You can find more examples of how to use DWork Web in the example directory.

Contributing

Contributions to DWork Web are highly encouraged and greatly appreciated. Whether you wish to report issues, suggest improvements, or submit pull requests, your contributions are invaluable in enhancing this project.

Changelog

For details about the latest changes, updates, and version history, please refer to the changelog file.

License

This project is licensed under the MIT License. For comprehensive details, please review the license file.

dwork-web's People

Contributors

diegiwg avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

adell

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.