@@ -49,7 +49,7 @@ module.exports = class Server {
4949
5050 async databaseSetup ( ) {
5151 // Get data normalize database
52- const { connection, availableTables, createSQL } = await Database . requestConnection ( this . serverSetup )
52+ const { connection, localhostConnection , availableTables, createSQL } = await Database . requestConnection ( this . serverSetup )
5353
5454 // Set the server name
5555 const { serverName } = await Database . requestServerName ( this . name )
@@ -77,6 +77,7 @@ module.exports = class Server {
7777 this . serverSetup . packageAddress = packageAddress
7878
7979 this . serverSetup . connection = connection
80+ this . serverSetup . localhostConnection = localhostConnection
8081
8182 this . serverSetup . userTable = userTable
8283 this . serverSetup . accountColumn = accountColumn
@@ -166,11 +167,9 @@ module.exports = class Server {
166167 log ( )
167168 log ( `🎉 Successfully created server project ${ chalk . yellow ( name ) } .` )
168169 log ( `👉 Go to ${ chalk . cyan ( `cd ${ name } ` ) } ` )
169- log ( `👉 Seed your database: ${ chalk . cyan ( `simpli server:seed` ) } ` )
170- log ( `👉 Generate the WAR file: ${ chalk . cyan ( 'mvn package' ) } ` )
171- log ( `👉 Initialize Tomcat: ${ chalk . cyan ( 'tomcat start' ) } ` )
172- log ( `👉 Move the WAR file to tomcat folder to deploy it: ${ chalk . cyan ( 'mv <warfile> <tomcat-webapps-location>' ) } ` )
173- log ( `👉 Go to ${ chalk . cyan ( 'localhost:8080/[WAR-file-name]' ) } ` )
170+ log ( `👉 Make sure the port ${ chalk . cyan ( `8080` ) } is not in use` )
171+ log ( `👉 Run ${ chalk . yellow ( `sh serve.sh` ) } ` )
172+ log ( `👉 Go to ${ chalk . cyan ( 'http://localhost:8080' ) } ` )
174173 log ( )
175174
176175 generator . printExitLogs ( )
@@ -253,7 +252,7 @@ module.exports = class Server {
253252 }
254253
255254 // Get data normalize database
256- const { connection, availableTables, createSQL } = await Database . requestConnection ( this . serverSetup , defaultConnection )
255+ const { connection, localhostConnection , availableTables, createSQL } = await Database . requestConnection ( this . serverSetup , defaultConnection )
257256 // Select tables to be added
258257 const { filteredTables } = await Database . requestTables ( availableTables , this . serverSetup )
259258
@@ -270,6 +269,7 @@ module.exports = class Server {
270269 await Database . confirm ( )
271270
272271 this . serverSetup . connection = connection
272+ this . serverSetup . localhostConnection = localhostConnection
273273 this . serverSetup . seedSamples = seedSamples
274274 this . serverSetup . createSQL = createSQL
275275
0 commit comments