** This is a demo of Litcode© of 2021. All copy rights are reserved**
Warning: Any unexpected environment configuration may cause undefined errors. Please configure strictly according to the requirements given.
Install sdkman
sdkman is recommended to install, otherwise you need to ensure that the version of the installed development software package is consistent with the following document.
Install JDK
sdk install java 11.0.11.j9-adpt
sdk default java 11.0.11.j9-adpt
add into /etc/hosts
for oauth workflow test
127.0.0.1 www.litcode.com
export LITCODE_MYSQL_USERNAME=""
export LITCODE_MYSQL_PASSWORD=""
export LITCODE_OAUTH2_CLIENT_ID=""
export LITCODE_OAUTH2_CLIENT_SECRET=""
To launch your tests:
./gradlew clean test
./gradlew clean assemble
./gradlew clean run
bash ./scripts/build_litcode_image.bash
Start Docker Container
docker run \
-p 0.0.0.0:80:80 \
--rm -it \
--name litcode \
-v "$(pwd)/config.json:/usr/app/config.json" \
-e LITCODE_OAUTH2_CLIENT_ID \
-e LITCODE_OAUTH2_CLIENT_SECRET \
-e LITCODE_MYSQL_USERNAME \
-e LITCODE_MYSQL_PASSWORD \
"docker.io/zonglinpeng/litcode:44aa077f"
GET
health check.
- Check the connection between the service and the database when triggered.
GET
Get Question records in pagination mode
- OAuth2 authentication required
input
- start: int QueryParam
- step: int QueryParam
GET
Get the profile of the currently logged in user
- OAuth2 authentication required