Notes API - Ktor example
- Open ./src/me/porge/notes/EnvironmentParameters.kt
- Check if the default values are compatible with what you want
- Open ./src/me/porge/notes/Module.kt and check if constants are compatible with what you want
- Open ./resources/application.conf and check if module path is correct
Ensure postgres is running and if the url is correct in EnvironmentParameters
- Ensure postgres is started and database exists.
- Run:
mvn clean && mvn package && mvn exec:java -Dexec.mainClass="io.ktor.server.netty.EngineMain"
To clean build cache:
mvn clean
To only update dependencies:
mvn install
To run tests and compile:
mvn package
To run only the tests:
mvn test
To compile:
mvn compile
To create a database:
psql
CREATE DATABASE notes_db;
To delete a database:
psql
DROP DATABASE notes_db;