Skip to content

Start a project

Astremy edited this page Feb 4, 2020 · 4 revisions

SAPAS is a simple framework to do back-end.

To create your first page, make this :

from SAPAS import *
#Import PWSH
site = Server("0.0.0.0",80)
#Init the server at the localhost path

#First path
@site.path("/")
def index():
	#Return the text of the page
	return "Hello World !"

#Start site
site.start()

Launch the program, and go to localhost, he shows "Hello World !"

In this case, site.path is the path of the page, if you set "/page", the url detection is "localhost/page"