├── .env.example ├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── babel.config.js ├── jest.config.js ├── package.json ├── script └── generateSwagger.ts ├── src ├── __tests__ │ ├── __snapshots__ │ │ └── app.spec.ts.snap │ └── app.spec.ts ├── api │ ├── apiHelpers.ts │ ├── auth │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── authLogin.spec.ts.snap │ │ │ └── authLogin.spec.ts │ │ ├── authForgotPassword.ts │ │ └── authLogin.ts │ └── user │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── userDelete.spec.ts.snap │ │ │ ├── userGet.spec.ts.snap │ │ │ ├── userGetAll.spec.ts.snap │ │ │ └── userPost.spec.ts.snap │ │ ├── userDelete.spec.ts │ │ ├── userGet.spec.ts │ │ ├── userGetAll.spec.ts │ │ └── userPost.spec.ts │ │ ├── userDefinition.yml │ │ ├── userDelete.ts │ │ ├── userGet.ts │ │ ├── userGet.yml │ │ ├── userGetAll.ts │ │ ├── userPost.ts │ │ └── userUtils.ts ├── app.ts ├── auth │ ├── auth.ts │ ├── base64.ts │ └── generateToken.ts ├── config.ts ├── index.ts ├── modules │ ├── index.ts │ └── user │ │ ├── UserModel.ts │ │ └── fixtures │ │ └── createUser.ts ├── mongo.ts ├── swagger.json ├── swagger.yml └── swagger │ ├── config.js │ └── swaggerConfig.yml ├── test ├── babel-transformer.js ├── clearDatabase.ts ├── connectMongoose.ts ├── counters.ts ├── disconnectMongoose.ts ├── environment │ └── mongodb.js ├── getObjectId.ts ├── index.ts ├── restUtils.ts ├── sanitizeTestObject.ts ├── setupFiles.js └── setupTestFramework.js ├── tsonfig.json ├── webpack.config.js ├── webpack └── ReloadServerPlugin.js └── yarn.lock /.env.example: -------------------------------------------------------------------------------- 1 | # application 2 | PORT=5000 3 | NODE_ENV=development 4 | 5 | MONGO_URI=mongodb://localhost/koacrud 6 | JWT_SECRET=jwt_secret -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/.github/FUNDING.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/README.md -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/babel.config.js -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/package.json -------------------------------------------------------------------------------- /script/generateSwagger.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/script/generateSwagger.ts -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/app.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/__tests__/__snapshots__/app.spec.ts.snap -------------------------------------------------------------------------------- /src/__tests__/app.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/__tests__/app.spec.ts -------------------------------------------------------------------------------- /src/api/apiHelpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/apiHelpers.ts -------------------------------------------------------------------------------- /src/api/auth/__tests__/__snapshots__/authLogin.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/auth/__tests__/__snapshots__/authLogin.spec.ts.snap -------------------------------------------------------------------------------- /src/api/auth/__tests__/authLogin.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/auth/__tests__/authLogin.spec.ts -------------------------------------------------------------------------------- /src/api/auth/authForgotPassword.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/auth/authForgotPassword.ts -------------------------------------------------------------------------------- /src/api/auth/authLogin.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/auth/authLogin.ts -------------------------------------------------------------------------------- /src/api/user/__tests__/__snapshots__/userDelete.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/__snapshots__/userDelete.spec.ts.snap -------------------------------------------------------------------------------- /src/api/user/__tests__/__snapshots__/userGet.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/__snapshots__/userGet.spec.ts.snap -------------------------------------------------------------------------------- /src/api/user/__tests__/__snapshots__/userGetAll.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/__snapshots__/userGetAll.spec.ts.snap -------------------------------------------------------------------------------- /src/api/user/__tests__/__snapshots__/userPost.spec.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/__snapshots__/userPost.spec.ts.snap -------------------------------------------------------------------------------- /src/api/user/__tests__/userDelete.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/userDelete.spec.ts -------------------------------------------------------------------------------- /src/api/user/__tests__/userGet.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/userGet.spec.ts -------------------------------------------------------------------------------- /src/api/user/__tests__/userGetAll.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/userGetAll.spec.ts -------------------------------------------------------------------------------- /src/api/user/__tests__/userPost.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/__tests__/userPost.spec.ts -------------------------------------------------------------------------------- /src/api/user/userDefinition.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userDefinition.yml -------------------------------------------------------------------------------- /src/api/user/userDelete.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userDelete.ts -------------------------------------------------------------------------------- /src/api/user/userGet.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userGet.ts -------------------------------------------------------------------------------- /src/api/user/userGet.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userGet.yml -------------------------------------------------------------------------------- /src/api/user/userGetAll.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userGetAll.ts -------------------------------------------------------------------------------- /src/api/user/userPost.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userPost.ts -------------------------------------------------------------------------------- /src/api/user/userUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/api/user/userUtils.ts -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/app.ts -------------------------------------------------------------------------------- /src/auth/auth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/auth/auth.ts -------------------------------------------------------------------------------- /src/auth/base64.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/auth/base64.ts -------------------------------------------------------------------------------- /src/auth/generateToken.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/auth/generateToken.ts -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/config.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/modules/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/modules/index.ts -------------------------------------------------------------------------------- /src/modules/user/UserModel.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/modules/user/UserModel.ts -------------------------------------------------------------------------------- /src/modules/user/fixtures/createUser.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/modules/user/fixtures/createUser.ts -------------------------------------------------------------------------------- /src/mongo.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/mongo.ts -------------------------------------------------------------------------------- /src/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/swagger.json -------------------------------------------------------------------------------- /src/swagger.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/swagger.yml -------------------------------------------------------------------------------- /src/swagger/config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/swagger/config.js -------------------------------------------------------------------------------- /src/swagger/swaggerConfig.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/src/swagger/swaggerConfig.yml -------------------------------------------------------------------------------- /test/babel-transformer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/babel-transformer.js -------------------------------------------------------------------------------- /test/clearDatabase.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/clearDatabase.ts -------------------------------------------------------------------------------- /test/connectMongoose.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/connectMongoose.ts -------------------------------------------------------------------------------- /test/counters.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/counters.ts -------------------------------------------------------------------------------- /test/disconnectMongoose.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/disconnectMongoose.ts -------------------------------------------------------------------------------- /test/environment/mongodb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/environment/mongodb.js -------------------------------------------------------------------------------- /test/getObjectId.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/getObjectId.ts -------------------------------------------------------------------------------- /test/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/index.ts -------------------------------------------------------------------------------- /test/restUtils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/restUtils.ts -------------------------------------------------------------------------------- /test/sanitizeTestObject.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/sanitizeTestObject.ts -------------------------------------------------------------------------------- /test/setupFiles.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/setupTestFramework.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/test/setupTestFramework.js -------------------------------------------------------------------------------- /tsonfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/tsonfig.json -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/webpack.config.js -------------------------------------------------------------------------------- /webpack/ReloadServerPlugin.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/webpack/ReloadServerPlugin.js -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/daniloab/koa-crud-backend/HEAD/yarn.lock --------------------------------------------------------------------------------