GithubHelp home page GithubHelp logo

my-vertx-first-app's Introduction

My First Vert.x 3 Application

This project is a very simple Vert.x 3 application and contains some explaination on how this application is built and tested.

Building

You build the project using:

mvn clean package

Testing

The application is tested using vertx-unit.

Packaging

The application is packaged as a fat jar, using the Maven Shade Plugin.

Running

Once packaged, just launch the fat jar as follows:

java -jar target/my-first-app-1.0-SNAPSHOT-fat.jar

Then, open a browser to http://localhost:8080.

my-vertx-first-app's People

Contributors

cescoffier avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

my-vertx-first-app's Issues

Let's work with mongo in Docker too and get config informations

Hi, I was trying to modify your code in order to get mongo data from his own Docker and not the localhost. I modified this

mongo = MongoClient.createShared(vertx, config());

into

    String mongo_host = System.getenv("MONGO_PORT_27017_TCP_ADDR");
    String mongo_port = System.getenv("MONGO_PORT_27017_TCP_PORT");
    JsonObject docker_mongo_config;

    System.out.println(mongo_host);
    System.out.println(config().getInteger("http.port")); // this does not work as expected

    if (mongo_host != null && mongo_host.length() != 0) {
       /// we are running a docker with link
       docker_mongo_config = new JsonObject()
            .put("http.port", 8082)        // hardcoded to validate until config() problem solved
            .put("db_name", "whiskies")    // same 
            .put("connection_string", "mongodb://"+mongo_host+":"+ mongo_port);
       mongo = MongoClient.createShared(vertx, docker_mongo_config);
    } else {
      mongo = MongoClient.createShared(vertx, config());
    }

This works fine with two dockers :

docker run -d --name mongolocal -p 10001:27017 arunoda/mongo
docker run -i -t -p 8080:8080 -v $PWD/target:/verticles --link mongolocal:mongo vertx/vertx3-exec run io.vertx.blog.first.MyFirstVerticle -cp /verticles/my-first-app-1.0-SNAPSHOT.jar

The question is : how to get access to config values (http.port and db_name) stored in configuration file ?

ORM?

This sample is using SQL statements. Is it possible to use JPA with Hibernate implementation as in a usual spring-boot application?

jquery版本与boostrap版本不匹配bug

在看你的教程学习中,但是你的jquery版本与bootstrap版本不同,而且你这个版本的bootstrap好像还有一个依赖没有加,所以点击 Add a new bottle 按钮不会弹框。我找到原英文版本的代码,根据他的版本改了之后就正常了

How to debug in Intellij

Hello,

I want to debug this app but I couldn't figure it out.
In README it says
java -jar target/my-first-app-1.0-SNAPSHOT-fat.jar which is a good but I want to debug in IntelliJ. Any idea?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.