first commit of portal user

This commit is contained in:
ghostter
2022-02-17 12:39:22 +07:00
commit 3c641bf869
18 changed files with 3419 additions and 0 deletions

37
conf/build.conf Normal file
View File

@@ -0,0 +1,37 @@
# sqlite3 build config
# You can switch flavors using: kodev flavor [newflavor]
# Set to yes if you wish to produce a single binary instead
# of a dynamic library. If you set this to yes you must also
# set kore_source together with kore_flavor.
#single_binary=no
#kore_source=/home/joris/src/kore
#kore_flavor=
# The flags below are shared between flavors
cflags=-Wall -Wmissing-declarations -Wshadow
cflags=-Wstrict-prototypes -Wmissing-prototypes
cflags=-Wpointer-arith -Wcast-qual -Wsign-compare
ldflags=-lsqlite3
#a rejouter pour linux
#ldflag=-lcrypt
ldflags=-L/usr/local/lib
cxxflags=-Wall -Wmissing-declarations -Wshadow
cxxflags=-Wpointer-arith -Wcast-qual -Wsign-compare
# Mime types for assets served via the builtin asset_serve_*
#mime_add=txt:text/plain; charset=utf-8
#mime_add=png:image/png
#mime_add=html:text/html; charset=utf-8
dev {
# These flags are added to the shared ones when
# you build the "dev" flavor.
cflags=-g
cxxflags=-g
}
#prod {
# You can specify additional flags here which are only
# included if you build with the "prod" flavor.
#}

35
conf/build.conf.bck Normal file
View File

@@ -0,0 +1,35 @@
# sqlite3 build config
# You can switch flavors using: kodev flavor [newflavor]
# Set to yes if you wish to produce a single binary instead
# of a dynamic library. If you set this to yes you must also
# set kore_source together with kore_flavor.
#single_binary=no
#kore_source=/home/joris/src/kore
#kore_flavor=
# The flags below are shared between flavors
cflags=-Wall -Wmissing-declarations -Wshadow
cflags=-Wstrict-prototypes -Wmissing-prototypes
cflags=-Wpointer-arith -Wcast-qual -Wsign-compare
ldflags=-lsqlite3
ldflags=-L/usr/lib
cxxflags=-Wall -Wmissing-declarations -Wshadow
cxxflags=-Wpointer-arith -Wcast-qual -Wsign-compare
# Mime types for assets served via the builtin asset_serve_*
#mime_add=txt:text/plain; charset=utf-8
#mime_add=png:image/png
#mime_add=html:text/html; charset=utf-8
dev {
# These flags are added to the shared ones when
# you build the "dev" flavor.
cflags=-g
cxxflags=-g
}
#prod {
# You can specify additional flags here which are only
# included if you build with the "prod" flavor.
#}

40
conf/sqlite3.conf Normal file
View File

@@ -0,0 +1,40 @@
# portal_user configuration
server notls {
bind 192.168.1.6 8888
tls no
}
load ./sqlite3.so
http_body_max 1024000000
http_body_disk_offload 1024000
workers 1
validator v_login regex ^[-_.a-zA-Z0-9]*$
validator v_password function v_password_func
pledge wpath cpath flock
domain * {
attach notls
accesslog kore_access.log
route / portal_user_load
route /css/style.css asset_serve_style_css
route /js/theme-switcher.js asset_serve_theme_switcher_js
route /signup create_user
params post / {
validate login v_login
validate password v_password
}
params post /signup {
validate login v_login
validate password v_password
}
}