How to get swagger running on localhost? -


i have both glassfish , tomcat installed on pc, , start them running web app netbeans, auto start server , load page , open browser show it.

now i'm learning swagger, , downloaded c:\swagger-ui-master

i can see app showing : file:///c:/swagger-ui-master/dist/index.html

seems it's working, how run :

http://localhost:8080/swagger-ui-master/dist/index.html

would work ?

do need create web app in netbeans , copy files project or need manually copy files [ *.war if ] glassfish or tomcat run : http://localhost:8080/... ?

i seem miss link in process.

create new maven project build war (see online examples, there’s simple web maven archetype starter)

add webjar dependency maven project compile time dependency

groupid = org.webjars artifactid = swagger-ui version = 2.1.0-m1 

add maven-jetty plugin under build plugins (google maven-jetty-plugin examples on how)

then need run maven goal jetty:run , start server based on maven project contents @ localhost:8080 … default support /webjars path , can navigate jar file contents directory.


Comments