├── .env ├── .github └── preview.png ├── .gitignore ├── LICENSE.md ├── README.md ├── jest.config.ts ├── ormconfig.json ├── package.json ├── public ├── diagrama.png └── nlw.jpg ├── src ├── __tests__ │ ├── Survey.test.ts │ └── User.test.ts ├── app.ts ├── controllers │ ├── AnswerController.ts │ ├── NpsController.ts │ ├── SendMailController.ts │ ├── SurveysController.ts │ └── UserController.ts ├── database │ ├── index.ts │ └── migrations │ │ ├── 1613763964003-CreateUsers.ts │ │ ├── 1614015788331-CreateSurveys.ts │ │ └── 1614101061721-CreateSurveysUsers.ts ├── errors │ └── AppError.ts ├── models │ ├── Survey.ts │ ├── SurveyUser.ts │ └── User.ts ├── repositories │ ├── SurveysRepository.ts │ ├── SurveysUsersRepository.ts │ └── UsersRespository.ts ├── routes.ts ├── server.ts ├── services │ └── SendMailService.ts └── views │ └── emails │ └── npsMail.hbs ├── tsconfig.json └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | URL_MAIL=http://localhost:3333/answers -------------------------------------------------------------------------------- /.github/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/.github/preview.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/README.md -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/jest.config.ts -------------------------------------------------------------------------------- /ormconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/ormconfig.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/package.json -------------------------------------------------------------------------------- /public/diagrama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/public/diagrama.png -------------------------------------------------------------------------------- /public/nlw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/public/nlw.jpg -------------------------------------------------------------------------------- /src/__tests__/Survey.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/__tests__/Survey.test.ts -------------------------------------------------------------------------------- /src/__tests__/User.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/__tests__/User.test.ts -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/app.ts -------------------------------------------------------------------------------- /src/controllers/AnswerController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/controllers/AnswerController.ts -------------------------------------------------------------------------------- /src/controllers/NpsController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/controllers/NpsController.ts -------------------------------------------------------------------------------- /src/controllers/SendMailController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/controllers/SendMailController.ts -------------------------------------------------------------------------------- /src/controllers/SurveysController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/controllers/SurveysController.ts -------------------------------------------------------------------------------- /src/controllers/UserController.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/controllers/UserController.ts -------------------------------------------------------------------------------- /src/database/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/database/index.ts -------------------------------------------------------------------------------- /src/database/migrations/1613763964003-CreateUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/database/migrations/1613763964003-CreateUsers.ts -------------------------------------------------------------------------------- /src/database/migrations/1614015788331-CreateSurveys.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/database/migrations/1614015788331-CreateSurveys.ts -------------------------------------------------------------------------------- /src/database/migrations/1614101061721-CreateSurveysUsers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/database/migrations/1614101061721-CreateSurveysUsers.ts -------------------------------------------------------------------------------- /src/errors/AppError.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/errors/AppError.ts -------------------------------------------------------------------------------- /src/models/Survey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/models/Survey.ts -------------------------------------------------------------------------------- /src/models/SurveyUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/models/SurveyUser.ts -------------------------------------------------------------------------------- /src/models/User.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/models/User.ts -------------------------------------------------------------------------------- /src/repositories/SurveysRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/repositories/SurveysRepository.ts -------------------------------------------------------------------------------- /src/repositories/SurveysUsersRepository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/repositories/SurveysUsersRepository.ts -------------------------------------------------------------------------------- /src/repositories/UsersRespository.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/repositories/UsersRespository.ts -------------------------------------------------------------------------------- /src/routes.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/routes.ts -------------------------------------------------------------------------------- /src/server.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/server.ts -------------------------------------------------------------------------------- /src/services/SendMailService.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/services/SendMailService.ts -------------------------------------------------------------------------------- /src/views/emails/npsMail.hbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/src/views/emails/npsMail.hbs -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketseat-education/nlw-04-nodejs/HEAD/yarn.lock --------------------------------------------------------------------------------