mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MSilva95
c6e7a476ff
|
3 years ago | |
---|---|---|
.. | ||
audit | 3 years ago | |
dockerize | 3 years ago | |
export-file | 3 years ago | |
stylize | 3 years ago | |
README.md | 3 years ago |
README.md
ascii-art-web
Objectives
Ascii-art-web consists in creating and running a server, in which it will be possible to use a web GUI (graphical user interface) version of your last project, ascii-art.
Your webpage must allow the use of different banners.
Implement the following HTTP endpoints:
-
GET
/
: Sends HTML response, the main page.
1.1. GET Tip: go templates to receive and display data from the server. -
POST
/ascii-art
: that sends data to Go server (text and a banner)
2.1. POST Tip: use form and other types of tags to make the post request.\
The main page must have:
- text input
- radio buttons, select object or anything else to change between banners
- button, which sends a POST request to '/ascii-art' and outputs the result on the page.
HTTP status code
Your endpoints must return appropriate HTTP status codes.
- OK (200), if everything went without errors.
- Not Found, if nothing is found, for example template or banner.
- Bad Request, for incorrect requests.
- Internal Server Error, for unhandled errors.
Markdown
In the root project directory create a README.MD
file with the following sections and contents:
- Description
- Authors
- Usage: how to run
- Implementation details: algorithm
Instructions
- HTTP server must be written in Go.
- HTML templates must be in the project root directory templates.
- The code must respect the good practices.
Allowed packages
- Only the standard go packages are allowed