This is using the Nestjs imitation Cnode.
Currently runs with:
With this sample, you can :
Environment Dependencies:
Clone this repository locally :
git clone https://github.com/jiayisheji/nest-cnode.git
Install dependencies with npm :
npm install
.env
fileYou also need to set the env config.
For that, if you just create a file named .env in the directory and set the values like the following, the app will just work:
.env file
#
# config
#
HOST='localhost'
PORT=3000
STATIC_HOST=''
MINI_ASSETS=false
#
# system
#
SUPER_ADMIN='super_admin'
SESSION_SECRET='cnode'
AUTH_COOKIE_NAME='nest_cnode'
GITHUB_CLIENT_ID=myCoolClientId
GITHUB_CLIENT_SECRET=myCoolSecret
#
# access qn
#
QN_ACCESS_KEY='your access key'
QN_SECRET_KEY='your secret key'
QN_BUCKET='your bucket name'
# 如果vps在国外,请使用 http://up.qiniug.com/ ,这是七牛的国际节点
# 如果在国内,此项请留空
QN_UPLOAD_URL=''
#
# Multer upload dest
#
# 开发上传的src 生成上传dist
UPLOAD_LOCATION='src'
#
# mail
#
MAIL_HOST='smtp.126.com'
MAIL_PORT=25
MAIL_USER='club@126.com'
MAIL_PASS='club'
#
# database redis
#
# Redis Replica Set
REDIS_HOST='127.0.0.1'
REDIS_PORT=6379
REDIS_PASSWORD=''
REDIS_DB=0
#
# database mongoDB
#
# MongoDB Replica Set
MONGO_HOST="localhost"
MONGO_PORT=27017
MONGO_USER="cnode_admin"
MONGO_PASS="123456"
MONGO_DBS="db_cnode"
# development
$ npm run start
# watch development mode
$ npm run start:dev
# production mode
npm run prestart:prod && npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Dependencies are managed through package.json. In that file you'll find two sections:
Package | Description |
---|---|
bcryptjs | Library for hashing and salting user passwords |
dotenv | Loads environment variables from .env file |
ejs-mate | Ejs template engine for Express |
ioredis | Redis ODM |
mongoose | MongoDB ODM |
nodemailer | Node.js library for sending emails |
passport | Simple and elegant authentication library for node.js |
passport-local | Sign-in with Username and Password plugin |
passport-github | Sign-in with Github plugin |
typescript | JavaScript compiler/type checker that boosts JavaScript productivity |
Package | Description |
---|---|
@types | Dependencies in this folder are .d.ts files used to provide types |
cross-env | Cross platform setting of environment scripts |
jest | Testing library for JavaScript |
nodemon | Utility that automatically restarts node process when it crashes |
supertest | HTTP assertion library |
ts-jest | A preprocessor with sourcemap support to help use TypeScript wit Jest |
ts-node | Enables directly running TS files. Used to run copy-static-assets.ts |
tslint | Linter (similar to ESLint) for TypeScript files |
nest-angular A fullstack JavaScript project, using technologies from the modern stack, such as: NestJS - a JS backend framework providing architecture out of the box with a syntax similar to Angular A
NG-NEST NG-NEST 是一个开源的 Web 应用程序框架,基于 Angular 和 Nest ,主要用于研发企业级中后台产品。https://ngnest.com/ Angular 是一个应用设计框架与开发平台,用于创建高效、复杂、精致的单页面应用。 Nest 是构建高效、可扩展的 Node.js 服务器端应用程序的框架。 特性 客户端与服务端都使用 TypeScript 构建,提供完整
NestJS Tutorial Repository Repository will be separated into server and client directory for NestJS backend and Angular frontend resepctively. Server repository Client repository Docker support Hook u
A progressive Node.js framework for building efficient and scalable server-side applications. Description The Nest CLI is a command-line interface tool that helps you to initialize, develop, and maint
nest-user-auth If this project helps you, please add a star! If you see an issue, please post it! This project uses NestJS, GraphQL, and MongoDB. This project implements user authentication. Adding ot
homebridge-nest-cam View your Nest cams in HomeKit using Homebridge with this plugin. FAQ Troubleshooting Error Codes Notes This plugin does not work with the latest Nest cameras. If you do not see it