File tree 1 file changed +21
-16
lines changed 1 file changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,26 @@ const createPackageJson = async (destDir, fileName) => {
122
122
fs . writeFileSync ( resultFile , minimalPackageJson ) ;
123
123
} ;
124
124
125
+ const showInstructions = ( lang ) => {
126
+ console . info ( 'The application has been generated!' )
127
+ if ( argv . lang === 'js' ) {
128
+ console . info ( `Use
129
+ npm install
130
+ to install its dependencies and
131
+ export DB_NAME=db DB_USER=user DB_PASSWORD=secret
132
+ npm start
133
+ afteward to run` ) ;
134
+ } else if ( argv . lang === 'go' ) {
135
+ console . info ( `Use
136
+ go run app.go
137
+ or
138
+ go build -o app
139
+ ./app
140
+ to build and run it` )
141
+ }
142
+ } ;
143
+
144
+
125
145
const argv = parseCommandLineArgs ( process . argv . slice ( 2 ) ) ;
126
146
127
147
const config = loadConfig ( endpointsFile ) ;
@@ -141,19 +161,4 @@ if (argv.lang === 'js') {
141
161
createPackageJson ( destDir , 'package.json' ) ;
142
162
}
143
163
144
- console . info ( 'The application has been generated!' )
145
- if ( argv . lang === 'js' ) {
146
- console . info ( `Use
147
- npm install
148
- to install its dependencies and
149
- export DB_NAME=db DB_USER=user DB_PASSWORD=secret
150
- npm start
151
- afteward to run` ) ;
152
- } else if ( argv . lang === 'go' ) {
153
- console . info ( `Use
154
- go run app.go
155
- or
156
- go build -o app
157
- ./app
158
- to build and run it` )
159
- }
164
+ showInstructions ( argv . lang ) ;
You can’t perform that action at this time.
0 commit comments