{"id":14978649,"url":"https://github.com/jiayisheji/nest-cnode","last_synced_at":"2025-08-20T22:31:14.603Z","repository":{"id":42234118,"uuid":"131492995","full_name":"jiayisheji/nest-cnode","owner":"jiayisheji","description":"CNode 社区 Nest 版本 https://cnodejs.org/","archived":false,"fork":false,"pushed_at":"2023-05-05T02:13:08.000Z","size":6493,"stargazers_count":157,"open_issues_count":9,"forks_count":29,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-06T13:53:57.064Z","etag":null,"topics":["angular","cnode","fp","jwt","mongodb","mongoose","nest","nestjs","nodejs","nx-workspace","oop","redis","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jiayisheji.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-29T12:33:12.000Z","updated_at":"2024-11-01T01:54:16.000Z","dependencies_parsed_at":"2024-09-24T01:01:36.880Z","dependency_job_id":null,"html_url":"https://github.com/jiayisheji/nest-cnode","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":0.03508771929824561,"last_synced_commit":"d0d6020a5e7a999a3ed9af1c22460c6e7e8bd939"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiayisheji%2Fnest-cnode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiayisheji%2Fnest-cnode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiayisheji%2Fnest-cnode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiayisheji%2Fnest-cnode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiayisheji","download_url":"https://codeload.github.com/jiayisheji/nest-cnode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230462906,"owners_count":18229864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","cnode","fp","jwt","mongodb","mongoose","nest","nestjs","nodejs","nx-workspace","oop","redis","typescript"],"created_at":"2024-09-24T13:58:07.622Z","updated_at":"2024-12-19T16:10:56.422Z","avatar_url":"https://github.com/jiayisheji.png","language":"JavaScript","readme":"# nest-cnode\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Description\n\nThis is using the [Nestjs](https://github.com/nestjs/nest) imitation [Cnode](https://cnodejs.org).\n\n## Installation\n\nCurrently runs with:\n\n- nodejs v8.11.1\n- mongodb v3.4.1\n- redis v3.2.1\n- nestjs v6.11.11\n\nWith this sample, you can :\n\n- Understand basic use of Nestjs, and store data with mongodb and redis\n- Use Nestjs with passport for authentication and third-party login Github\n\n## Getting Started\n\nEnvironment Dependencies:\n\n- [nodejs](http://nodejs.cn/)\n- [mongodb](https://www.mongodb.com/)\n- [redis](https://redis.io/)\n\nClone this repository locally :\n\n```bash\ngit clone https://github.com/jiayisheji/nest-cnode.git\n```\n\nInstall dependencies with npm :\n\n```bash\nnpm install\n```\n\n## Set up `.env` file\n\nYou also need to set the env config.\n\nFor that, if you just create a file named .env in the directory and set the values like the following, the app will just work:\n\n.env file\n\n```bash\n#\n# config\n#\nHOST='localhost'\nPORT=3000\nSTATIC_HOST=''\nMINI_ASSETS=false\n\n#\n# system\n#\nSUPER_ADMIN='super_admin'\nSESSION_SECRET='cnode'\nAUTH_COOKIE_NAME='nest_cnode'\nGITHUB_CLIENT_ID=myCoolClientId\nGITHUB_CLIENT_SECRET=myCoolSecret\n\n#\n# access qn\n#\nQN_ACCESS_KEY='your access key'\nQN_SECRET_KEY='your secret key'\nQN_BUCKET='your bucket name'\n# 如果vps在国外，请使用 http://up.qiniug.com/ ，这是七牛的国际节点\n# 如果在国内，此项请留空\nQN_UPLOAD_URL=''\n\n#\n# Multer upload dest\n#\n# 开发上传的src 生成上传dist\nUPLOAD_LOCATION='src'\n\n#\n# mail\n#\nMAIL_HOST='smtp.126.com'\nMAIL_PORT=25\nMAIL_USER='club@126.com'\nMAIL_PASS='club'\n\n#\n# database redis\n#\n# Redis Replica Set\nREDIS_HOST='127.0.0.1'\nREDIS_PORT=6379\nREDIS_PASSWORD=''\nREDIS_DB=0\n\n#\n# database mongoDB\n#\n# MongoDB Replica Set\nMONGO_HOST=\"localhost\"\nMONGO_PORT=27017\nMONGO_USER=\"cnode_admin\"\nMONGO_PASS=\"123456\"\nMONGO_DBS=\"db_cnode\"\n```\n\n## Running the app\n\n```bash\n# development\n$ npm run start\n\n# watch development mode\n$ npm run start:dev\n\n# production mode\n npm run prestart:prod \u0026\u0026 npm run start:prod\n```\n\n## Test\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n\n## Dependencies\n\nDependencies are managed through package.json. In that file you'll find two sections:\n\n### dependencies\n\n| Package         | Description                                                          |\n| --------------- | -------------------------------------------------------------------- |\n| bcryptjs        | Library for hashing and salting user passwords                       |\n| dotenv          | Loads environment variables from .env file                           |\n| ejs-mate        | Ejs template engine for Express                                      |\n| ioredis         | Redis ODM                                                            |\n| mongoose        | MongoDB ODM                                                          |\n| nodemailer      | Node.js library for sending emails                                   |\n| passport        | Simple and elegant authentication library for node.js                |\n| passport-local  | Sign-in with Username and Password plugin                            |\n| passport-github | Sign-in with Github plugin                                           |\n| typescript      | JavaScript compiler/type checker that boosts JavaScript productivity |\n\n### devDependencies\n\n| Package   | Description                                                           |\n| --------- | --------------------------------------------------------------------- |\n| @types    | Dependencies in this folder are .d.ts files used to provide types     |\n| cross-env | Cross platform setting of environment scripts                         |\n| jest      | Testing library for JavaScript                                        |\n| nodemon   | Utility that automatically restarts node process when it crashes      |\n| supertest | HTTP assertion library                                                |\n| ts-jest   | A preprocessor with sourcemap support to help use TypeScript wit Jest |\n| ts-node   | Enables directly running TS files. Used to run copy-static-assets.ts  |\n| tslint    | Linter (similar to ESLint) for TypeScript files                       |\n\n## Reference\n\n1.  Awesome Nest\n\n- [https://github.com/juliandavidmr/awesome-nest](https://github.com/juliandavidmr/awesome-nest)\n\n2.  NestJS Samples\n\n- [https://github.com/nestjs/nest/tree/master/sample](https://github.com/nestjs/nest/tree/master/sample)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiayisheji%2Fnest-cnode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiayisheji%2Fnest-cnode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiayisheji%2Fnest-cnode/lists"}