Tag: glassfish

如何让Node.js和Glassfish服务器监听同一个端口?

我正在使用运行在端口8080上的Glassfish服务器运行我的Web应用程序。对于同一个Web应用程序,我正在尝试使用node.js集成Stripe API。 其余的web应用程序在localhost:8080上运行。 那么如何通过node.js和glassfish监听同一个8080端口,以便我的Web应用程序与Stripe node.js集成。 我应该使用networking套接字? HTML页面: <body> <form id="form" action="/acctCreated" method="POST"> <label>Card #: <input type="text" size="16" data-stripe="number" placeholder="Card number" /></label> <label>Expiry month: <input type="text" size="2" data-stripe="exp-month" placeholder="MM" /></label> <label>year: <input type="text" size="2" data-stripe="exp-year" placeholder="YY" /></label> <label>CVC: <input type="text" size="4" data-stripe="cvc" placeholder="CVC" /></label> <button type="submit">Pay</button> </form> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="https://js.stripe.com/v2/"></script> <script type="text/javascript"> Stripe.setPublishableKey('pk_test_mHCVXXlu5il6pgbQCQzmKY2S'); var $form […]