diff --git a/README.md b/README.md index 4f6603f..4060a7c 100644 --- a/README.md +++ b/README.md @@ -35,34 +35,3 @@ Also, you can test out fig files in `examples` folder. ## Learn Fig Fig has a [book](https://fig-lang.github.io/book/docs/Fig%20introduction) for learning the syntax and basic principles of fig. - -## Server-side -You can write server-side applications with FigLang, FigCli has a command called `server` That will listen to the address and port you specified, -each time a request arrives the CLI will run the script and pass the HTTP request content to the main function. - -### Server command -Here is an example usage of the `server` command: - -`fig server ./test.fig --addr localhost:8080` - -### Example server-side code -Here is an example source code of using the server feature in FigCli, It's just like an ordinary Fig program but the main function will get one parameter, Which will contain the content of the HTTP request as `char[]` or a string. - -`test.fig`: - -``` -import server; - -export fn main (req: char[]): char[] { - let headers = "Content-Type: text/html -Connection: Closed"; - - let res = new_response("200", "OK", headers, "