🚴♀️When Beginners would like to build a server by any language, or use curl command, or understand...🚴♂️
After Download, you can build a server by Go, Python, JavaScript(Deno), Ruby, or...(others: now preparing).
You can practice using curl command, or understand how to build a server, or customize to your server whatever you like.
Note You can use with ease because you can build a server at localhost(127.0.0.1)🫶
Note Because localhost can be seen by only you, and it is not public🤠
POST: A server will acknowledge, and response the message if you send correct request including the argments of 'text' and 'number'
GET: A server will acknowledge the request, although a server won't response to Client
Note Actually, it's no relations, and it's no problem you change the number of port.
Note Wiki is updated occasionally for Beginners.
For Beginners, it is used different port at any language, though.
- Go -> localhost:3010
- Python -> localhost:3020
- JavaScript(Deno) -> localhost:3030
- Ruby -> localhost:3040
- Others -> Now preparing☕️
go version go1.20.4 darwin/arm64 when I confirmed by using
go version
go run main.go
curl -X POST -d 'text=ニコニコ' -d 'number=2525' localhost:3010/admin
Server is started at http://localhost:3010
Accepted Control message, Text: ニコニコ, Number: 2525
Sent Control message about Text and Numebr: ニコニコ, Number: 2525
Python 3.11.3 when I confirmed by using
python --version
Note startswith() can be used since Python 3.9
python main.py
curl -X POST -d 'text=ニコニコ' -d 'number=2525' localhost:3020/admin
Server is started at http://localhost:3020
127.0.0.1 - - [14/Jun/2023 20:52:09] "POST /admin HTTP/1.1" 200 -
Accepted Control message: Text: ニコニコ, Number: 2525
OK, Accepted Control message: Text: ニコニコ, Number: 2525
Reference: https://deno.land/[email protected]/http/server.ts
v8 11.5.150.2, typescript 5.0.4 when I confirmed by using
deno --version
deno run main.ts
curl -X POST -d 'text=ニコニコ' -d 'number=2525' localhost:3030/admin
Server is started at http://localhost:3030
✅ Granted all net access.
Listening on http://localhost:3030/
Accepted Control message, Text: ニコニコ, Number: 2525
OK, Accepted Control message, Text: ニコニコ, Number: 2525
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] when I confirmed by using
ruby -v
Note you must comand
gem install webrick
if you don't install it
ruby main.rb
curl -X POST -d 'text=ニコニコ' -d 'number=2525' localhost:3040/admin
Server is started at http://localhost:3040
[2023-06-14 20:32:56] INFO WEBrick 1.8.1
[2023-06-14 20:32:56] INFO ruby 3.2.2 (2023-03-30) [arm64-darwin22]
[2023-06-14 20:32:56] INFO WEBrick::HTTPServer#start: pid=41089 port=3040
Accepted Control message, Text: ニコニコ, Number: 2525
127.0.0.1 - - [14/Jun/2023:20:32:59 JST] "POST /admin HTTP/1.1" 200 62
OK, Accepted Control message, Text: ニコニコ, Number: 2525