| 123456789101112131415161718192021222324252627 |
- package io.senslog.app;
- import io.senslog.database.DBConfig;
- import io.senslog.database.DBRepositoryPool;
- public class Main {
- public static void main(String[] args) throws Exception {
- Parameters params = null;
- try {
- params = Parameters.parse(args);
- } catch (RuntimeException e) {
- System.err.println(e.getMessage());
- System.exit(1);
- }
- DBConfig dbConfig = new DBConfig(
- "jdbc:postgresql://localhost:5432/senslog1",
- "postgres", "root", 6
- );
- DBRepositoryPool.create(dbConfig);
- new JettyServer()
- .start(params.getPort(), params.getPathPrefix());
- }
- }
|