Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
init-things
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
init-things
Commits
c336b2e5
Commit
c336b2e5
authored
May 21, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add swagger
parent
600dd7e2
Pipeline
#3291
passed with stages
in 1 minute and 35 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
1 deletion
+47
-1
things/nest-koishijs/install-npm.sh
things/nest-koishijs/install-npm.sh
+5
-0
things/nest-koishijs/src/main.ts
things/nest-koishijs/src/main.ts
+12
-0
things/nest-typeorm/install-npm.sh
things/nest-typeorm/install-npm.sh
+6
-1
things/nest-typeorm/src/main.ts
things/nest-typeorm/src/main.ts
+12
-0
things/nest/src/main.ts
things/nest/src/main.ts
+12
-0
No files found.
things/nest-koishijs/install-npm.sh
View file @
c336b2e5
#!/bin/bash
#!/bin/bash
npm
install
--save
\
npm
install
--save
\
class-validator
\
class-transformer
\
@nestjs/swagger
\
swagger-ui-express
\
lodash
\
lodash
\
typeorm
\
typeorm
\
@nestjs/typeorm
\
@nestjs/typeorm
\
...
@@ -11,3 +15,4 @@ npm install --save \
...
@@ -11,3 +15,4 @@ npm install --save \
npm
install
--save-dev
\
npm
install
--save-dev
\
@types/lodash
@types/lodash
@types/express
things/nest-koishijs/src/main.ts
View file @
c336b2e5
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
SwaggerModule
,
DocumentBuilder
}
from
'
@nestjs/swagger
'
;
import
{
AppModule
}
from
'
./app.module
'
;
import
{
AppModule
}
from
'
./app.module
'
;
async
function
bootstrap
()
{
async
function
bootstrap
()
{
const
app
=
await
NestFactory
.
create
(
AppModule
);
const
app
=
await
NestFactory
.
create
(
AppModule
);
app
.
enableCors
();
app
.
enableCors
();
const
documentConfig
=
new
DocumentBuilder
()
.
setTitle
(
'
app
'
)
.
setDescription
(
'
The app
'
)
.
setVersion
(
'
1.0
'
)
.
addTag
(
'
app-tag
'
)
.
build
();
const
document
=
SwaggerModule
.
createDocument
(
app
,
documentConfig
);
SwaggerModule
.
setup
(
'
docs
'
,
app
,
document
);
await
app
.
listen
(
3000
);
await
app
.
listen
(
3000
);
}
}
bootstrap
();
bootstrap
();
things/nest-typeorm/install-npm.sh
View file @
c336b2e5
#!/bin/bash
#!/bin/bash
npm
install
--save
\
npm
install
--save
\
class-validator
\
class-transformer
\
@nestjs/swagger
\
swagger-ui-express
\
lodash
\
lodash
\
typeorm
\
typeorm
\
@nestjs/typeorm
\
@nestjs/typeorm
\
...
@@ -7,4 +11,5 @@ npm install --save \
...
@@ -7,4 +11,5 @@ npm install --save \
reflect-metadata
reflect-metadata
npm
install
--save-dev
\
npm
install
--save-dev
\
@types/lodash
@types/lodash
\
@types/express
things/nest-typeorm/src/main.ts
View file @
c336b2e5
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
SwaggerModule
,
DocumentBuilder
}
from
'
@nestjs/swagger
'
;
import
{
AppModule
}
from
'
./app.module
'
;
import
{
AppModule
}
from
'
./app.module
'
;
async
function
bootstrap
()
{
async
function
bootstrap
()
{
const
app
=
await
NestFactory
.
create
(
AppModule
);
const
app
=
await
NestFactory
.
create
(
AppModule
);
app
.
enableCors
();
app
.
enableCors
();
const
documentConfig
=
new
DocumentBuilder
()
.
setTitle
(
'
app
'
)
.
setDescription
(
'
The app
'
)
.
setVersion
(
'
1.0
'
)
.
addTag
(
'
app-tag
'
)
.
build
();
const
document
=
SwaggerModule
.
createDocument
(
app
,
documentConfig
);
SwaggerModule
.
setup
(
'
docs
'
,
app
,
document
);
await
app
.
listen
(
3000
);
await
app
.
listen
(
3000
);
}
}
bootstrap
();
bootstrap
();
things/nest/src/main.ts
View file @
c336b2e5
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
NestFactory
}
from
'
@nestjs/core
'
;
import
{
SwaggerModule
,
DocumentBuilder
}
from
'
@nestjs/swagger
'
;
import
{
AppModule
}
from
'
./app.module
'
;
import
{
AppModule
}
from
'
./app.module
'
;
async
function
bootstrap
()
{
async
function
bootstrap
()
{
const
app
=
await
NestFactory
.
create
(
AppModule
);
const
app
=
await
NestFactory
.
create
(
AppModule
);
app
.
enableCors
();
app
.
enableCors
();
const
documentConfig
=
new
DocumentBuilder
()
.
setTitle
(
'
app
'
)
.
setDescription
(
'
The app
'
)
.
setVersion
(
'
1.0
'
)
.
addTag
(
'
app-tag
'
)
.
build
();
const
document
=
SwaggerModule
.
createDocument
(
app
,
documentConfig
);
SwaggerModule
.
setup
(
'
docs
'
,
app
,
document
);
await
app
.
listen
(
3000
);
await
app
.
listen
(
3000
);
}
}
bootstrap
();
bootstrap
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment