Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
Homework83_M11
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ли Джен Сеп
Homework83_M11
Commits
6ed9bec4
Commit
6ed9bec4
authored
Dec 19, 2024
by
Ли Джен Сеп
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#5
удалил ненужные файлы и почистил код
parent
7b9451a2
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
8 additions
and
140 deletions
+8
-140
README.md
README.md
+3
-0
package-lock.json
package-lock.json
+0
-6
app.controller.spec.ts
service/src/app.controller.spec.ts
+0
-22
app.controller.ts
service/src/app.controller.ts
+0
-12
app.module.ts
service/src/app.module.ts
+0
-11
app.service.ts
service/src/app.service.ts
+0
-8
main.ts
service/src/main.ts
+5
-5
update-message.dto.ts
service/src/message/dto/update-message.dto.ts
+0
-4
message.entity.ts
service/src/message/entities/message.entity.ts
+0
-1
message.controller.spec.ts
service/src/message/message.controller.spec.ts
+0
-20
message.service.spec.ts
service/src/message/message.service.spec.ts
+0
-18
app.e2e-spec.ts
service/test/app.e2e-spec.ts
+0
-24
jest-e2e.json
service/test/jest-e2e.json
+0
-9
No files found.
README.md
View file @
6ed9bec4
POST http://localhost:8000/encode
POST http://localhost:8000/decode
package-lock.json
deleted
100644 → 0
View file @
7b9451a2
{
"name"
:
"homework83_m11"
,
"lockfileVersion"
:
3
,
"requires"
:
true
,
"packages"
:
{}
}
service/src/app.controller.spec.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Test
,
TestingModule
}
from
'@nestjs/testing'
;
import
{
AppController
}
from
'./app.controller'
;
import
{
AppService
}
from
'./app.service'
;
describe
(
'AppController'
,
()
=>
{
let
appController
:
AppController
;
beforeEach
(
async
()
=>
{
const
app
:
TestingModule
=
await
Test
.
createTestingModule
({
controllers
:
[
AppController
],
providers
:
[
AppService
],
}).
compile
();
appController
=
app
.
get
<
AppController
>
(
AppController
);
});
describe
(
'root'
,
()
=>
{
it
(
'should return "Hello World!"'
,
()
=>
{
expect
(
appController
.
getHello
()).
toBe
(
'Hello World!'
);
});
});
});
service/src/app.controller.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Controller
,
Get
}
from
'@nestjs/common'
;
import
{
AppService
}
from
'./app.service'
;
@
Controller
()
export
class
AppController
{
constructor
(
private
readonly
appService
:
AppService
)
{}
@
Get
()
getHello
():
string
{
return
this
.
appService
.
getHello
();
}
}
service/src/app.module.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Module
}
from
'@nestjs/common'
;
import
{
AppController
}
from
'./app.controller'
;
import
{
AppService
}
from
'./app.service'
;
import
{
MessageModule
}
from
'./message/message.module'
;
@
Module
({
imports
:
[
MessageModule
],
controllers
:
[
AppController
],
providers
:
[
AppService
],
})
export
class
AppModule
{}
service/src/app.service.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Injectable
}
from
'@nestjs/common'
;
@
Injectable
()
export
class
AppService
{
getHello
():
string
{
return
'Hello World!'
;
}
}
service/src/main.ts
View file @
6ed9bec4
import
{
NestFactory
}
from
'@nestjs/core'
;
import
{
NestFactory
}
from
'@nestjs/core'
;
import
{
AppModule
}
from
'./app.module'
;
import
{
ConfigModule
}
from
'@nestjs/config'
;
import
{
ConfigModule
}
from
'@nestjs/config'
;
import
{
MessageModule
}
from
'./message/message.module'
;
ConfigModule
.
forRoot
();
ConfigModule
.
forRoot
();
async
function
bootstrap
()
{
async
function
startServer
()
{
const
app
=
await
NestFactory
.
create
(
App
Module
);
const
app
=
await
NestFactory
.
create
(
Message
Module
);
await
app
.
listen
(
process
.
env
.
PORT
??
3
000
);
await
app
.
listen
(
8
000
);
}
}
bootstrap
();
startServer
();
service/src/message/dto/update-message.dto.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
PartialType
}
from
'@nestjs/mapped-types'
;
import
{
CreateMessageDto
}
from
'./create-message.dto'
;
export
class
UpdateMessageDto
extends
PartialType
(
CreateMessageDto
)
{}
service/src/message/entities/message.entity.ts
deleted
100644 → 0
View file @
7b9451a2
export
class
Message
{}
service/src/message/message.controller.spec.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Test
,
TestingModule
}
from
'@nestjs/testing'
;
import
{
MessageController
}
from
'./message.controller'
;
import
{
MessageService
}
from
'./message.service'
;
describe
(
'MessageController'
,
()
=>
{
let
controller
:
MessageController
;
beforeEach
(
async
()
=>
{
const
module
:
TestingModule
=
await
Test
.
createTestingModule
({
controllers
:
[
MessageController
],
providers
:
[
MessageService
],
}).
compile
();
controller
=
module
.
get
<
MessageController
>
(
MessageController
);
});
it
(
'should be defined'
,
()
=>
{
expect
(
controller
).
toBeDefined
();
});
});
service/src/message/message.service.spec.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Test
,
TestingModule
}
from
'@nestjs/testing'
;
import
{
MessageService
}
from
'./message.service'
;
describe
(
'MessageService'
,
()
=>
{
let
service
:
MessageService
;
beforeEach
(
async
()
=>
{
const
module
:
TestingModule
=
await
Test
.
createTestingModule
({
providers
:
[
MessageService
],
}).
compile
();
service
=
module
.
get
<
MessageService
>
(
MessageService
);
});
it
(
'should be defined'
,
()
=>
{
expect
(
service
).
toBeDefined
();
});
});
service/test/app.e2e-spec.ts
deleted
100644 → 0
View file @
7b9451a2
import
{
Test
,
TestingModule
}
from
'@nestjs/testing'
;
import
{
INestApplication
}
from
'@nestjs/common'
;
import
*
as
request
from
'supertest'
;
import
{
AppModule
}
from
'./../src/app.module'
;
describe
(
'AppController (e2e)'
,
()
=>
{
let
app
:
INestApplication
;
beforeEach
(
async
()
=>
{
const
moduleFixture
:
TestingModule
=
await
Test
.
createTestingModule
({
imports
:
[
AppModule
],
}).
compile
();
app
=
moduleFixture
.
createNestApplication
();
await
app
.
init
();
});
it
(
'/ (GET)'
,
()
=>
{
return
request
(
app
.
getHttpServer
())
.
get
(
'/'
)
.
expect
(
200
)
.
expect
(
'Hello World!'
);
});
});
service/test/jest-e2e.json
deleted
100644 → 0
View file @
7b9451a2
{
"moduleFileExtensions"
:
[
"js"
,
"json"
,
"ts"
],
"rootDir"
:
"."
,
"testEnvironment"
:
"node"
,
"testRegex"
:
".e2e-spec.ts$"
,
"transform"
:
{
"^.+
\\
.(t|j)s$"
:
"ts-jest"
}
}
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