Skip to content

felipefpx/notes_api_ktor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notes API - Ktor example

Check env variables defaults

  • Open ./src/me/porge/notes/EnvironmentParameters.kt
  • Check if the default values are compatible with what you want

Check project constants

  • 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

Check Postgres

Ensure postgres is running and if the url is correct in EnvironmentParameters

To run the project

  • Ensure postgres is started and database exists.
  • Run:
mvn clean && mvn package && mvn exec:java -Dexec.mainClass="io.ktor.server.netty.EngineMain"

Additional info

Mvn basics

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

Postgres basics

To create a database:

psql
CREATE DATABASE notes_db;

To delete a database:

psql
DROP DATABASE notes_db;

About

Simple RESTful API using Ktor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages