Sqlite (#2)
* Migrated ur an sqlite database * Removed unnecessary IOExceptions * Removed an util class not needed anymore * Updated README.md and docker-compose.yml to reflect new storage mechanism * This change was not meant for this branch * Port change with environment variable * Unused imports * Updated README.md * Added basic protection against duplication
This commit is contained in:
committed by
GitHub
parent
425b8a5f44
commit
218f2fa368
@@ -1,7 +1,5 @@
|
||||
package tk.draganczuk.url;
|
||||
|
||||
import spark.Filter;
|
||||
|
||||
import static spark.Spark.*;
|
||||
|
||||
public class App {
|
||||
@@ -17,13 +15,13 @@ public class App {
|
||||
staticFiles.location("/public");
|
||||
}
|
||||
|
||||
port(Integer.parseInt(System.getProperty("port", "4567")));
|
||||
port(Integer.parseInt(System.getenv().getOrDefault("port", "4567")));
|
||||
|
||||
// Add GZIP compression
|
||||
after(Filters::addGZIP);
|
||||
|
||||
// No need to auth in dev
|
||||
if(System.getenv("dev") == null) {
|
||||
if (System.getenv("dev") == null) {
|
||||
// Authenticate
|
||||
before("/api/*", Filters.createAuthFilter());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user