Skip to content

Commit 3629720

Browse files
committed
first commit
0 parents  commit 3629720

35 files changed

+13820
-0
lines changed

.eslintrc.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'prettier',
12+
'prettier/@typescript-eslint',
13+
],
14+
root: true,
15+
env: {
16+
node: true,
17+
jest: true,
18+
},
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
},
24+
};

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# compiled output
2+
/dist
3+
/node_modules
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
yarn-debug.log*
10+
yarn-error.log*
11+
lerna-debug.log*
12+
13+
# OS
14+
.DS_Store
15+
16+
# Tests
17+
/coverage
18+
/.nyc_output
19+
20+
# IDEs and editors
21+
/.idea
22+
.project
23+
.classpath
24+
.c9/
25+
*.launch
26+
.settings/
27+
*.sublime-workspace
28+
29+
# IDE - VSCode
30+
.vscode/*
31+
!.vscode/settings.json
32+
!.vscode/tasks.json
33+
!.vscode/launch.json
34+
!.vscode/extensions.json

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all"
4+
}

README.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<p align="center">
2+
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
3+
</p>
4+
5+
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
6+
[travis-url]: https://travis-ci.org/nestjs/nest
7+
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
8+
[linux-url]: https://travis-ci.org/nestjs/nest
9+
10+
<p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
11+
<p align="center">
12+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
13+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
14+
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
15+
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
16+
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
17+
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
18+
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
19+
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
20+
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
21+
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
22+
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
23+
</p>
24+
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
25+
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
26+
27+
## Description
28+
29+
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
30+
31+
## Installation
32+
33+
```bash
34+
$ npm install
35+
```
36+
37+
## Running the app
38+
39+
```bash
40+
# development
41+
$ npm run start
42+
43+
# watch mode
44+
$ npm run start:dev
45+
46+
# production mode
47+
$ npm run start:prod
48+
```
49+
50+
## Test
51+
52+
```bash
53+
# unit tests
54+
$ npm run test
55+
56+
# e2e tests
57+
$ npm run test:e2e
58+
59+
# test coverage
60+
$ npm run test:cov
61+
```
62+
63+
## Support
64+
65+
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
66+
67+
## Stay in touch
68+
69+
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
70+
- Website - [https://nestjs.com](https://nestjs.com/)
71+
- Twitter - [@nestframework](https://twitter.com/nestframework)
72+
73+
## License
74+
75+
Nest is [MIT licensed](LICENSE).

database/datamodel.prisma

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
type User {
2+
id: ID! @id
3+
email: String! @unique
4+
name: String
5+
password: String!
6+
posts: [Post!]! @relation(link: INLINE)
7+
createdAt: DateTime! @createdAt
8+
updatedAt: DateTime! @updatedAt
9+
}
10+
11+
type Post {
12+
id: ID! @id
13+
title: String!
14+
body: String
15+
author: User!
16+
createdAt: DateTime! @createdAt
17+
updatedAt: DateTime! @updatedAt
18+
}
19+
20+
type Hotel{
21+
id: ID! @id
22+
hotelName: String!
23+
title: String!
24+
price: Int!
25+
contactNumber: Int!
26+
extraBed: Boolean
27+
}

docker-compose.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: '3'
2+
services:
3+
prisma:
4+
image: prismagraphql/prisma:1.34
5+
restart: always
6+
ports:
7+
- '4466:4466'
8+
environment:
9+
PRISMA_CONFIG: |
10+
port: 4466
11+
databases:
12+
default:
13+
connector: mongo
14+
uri: mongodb://host.docker.internal:27017/HotelPrisma
15+
database: HotelPrisma
16+
mongo:
17+
image: mongo:3.6
18+
restart: always
19+
environment:
20+
MONGO_INITDB_ROOT_USERNAME: prisma
21+
MONGO_INITDB_ROOT_PASSWORD: prisma
22+
ports:
23+
- '27017:27017'
24+
volumes:
25+
- mongo:/var/lib/mongo
26+
volumes:
27+
mongo: ~

0 commit comments

Comments
 (0)