README 810 B

12345678910111213141516171819202122232425262728
  1. # This example demonstrates simple server based on console version of BlackBox.
  2. # To run this example you need to build 'Interp' version of BlackBox:
  3. # 1. Go to the BlackBox folder
  4. cd ../../BlackBox
  5. # 2. Clean previous
  6. ./switch-target none
  7. ./clean
  8. # 3. Switch to BlackBox Interp and compile
  9. ./switch-target `uname -s` Interp
  10. ./build
  11. # 4. Go to the example folder and compile the example
  12. cd ../examples/server
  13. echo "DevCompiler.CompileThis TcpService TcpServer TcpBytes TcpTask Init" | ../../BlackBox/run-BlackBox
  14. # 5. Stop any other server that using 80 ports (apache, nginx, ...)
  15. # 6. Then you can start server using command:
  16. sudo ./bbserver
  17. # To check the work of the server open browser and look the page http://localhost
  18. # There are scripts ./start and ./stop for the daemon start and stop modes