A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
my-app-nest
-
tcp
path: micro-service/tcp
-
redis
path: micro-service/tcp
-
mqtt
path: micro-service/mqtt
-
rabbit-mq
path: micro-service/rabbit-mq
-
nats
path: micro-service/nats
-
kafka
path: micro-service/kafka
-
grpc
path: micro-service/grpc
- redis
docker pull redis
docker run --name redis -d -p 6379:6379 -v /home/server-1/data/redis:/data/redis redis redis-server --appendonly yes
- postgres
docker pull postgres
docker run --name postgres -e POSTGRES_PASSWORD=admin@me -p 5432:5432 -v /home/server-1/data/postgresql:/var/lib/postgresql/data -d postgres
docker exec -it postgres psql -U postgres -c "ALTER USER postgres WITH PASSWORD 'admin@me';"
docker exec -it postgres psql -U postgres -c "CREATE DATABASE db_nest;"
docker exec -it postgres psql -U postgres -c "\list"
- zookeeper kafka
docker pull zookeeper
docker pull bitnami/kafka:latest
docker pull wurstmeister/kafka
docker pull bitnami/kafka:latest
docker run -d --name zookeeper -p 2181:2181 zookeeper
docker run -d --name kafka -p 9092:9092 --link zookeeper --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env KAFKA_ADVERTISED_HOST_NAME=localhost wurstmeister/kafka
- nats
docker pull nats
docker run -d --name nats-server -p 4222:4222 nats
5.rabbitmq
docker pull rabbitmq
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin@me rabbitmq:3-management
docker run -d -p 15673:15672 -p 5674:5672 \
--restart=always \
-e RABBITMQ_DEFAULT_VHOST=my_vhost \
-e RABBITMQ_DEFAULT_USER=admin \
-e RABBITMQ_DEFAULT_PASS=admin123456 \
--hostname myRabbit \
--name rabbitmq-new\
rabbitmq:latest
docker exec -it 容器名/容器id rabbitmq-plugins enable rabbitmq_management
- mongodb
docker pull mongo:latest
docker run --name mongo -p 27017:27017 -v /home/server-1/data/postgres:/data/db -d mongo
docker run -dit --name mongo \
-p 17017:27017 \
-v /data/mongo/config/mongod.conf:/etc/mongod.conf \
-v /data/mongo/data:/data/db \
-v /data/mongo/logs:/var/log/mongodb \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD=123456 \
--restart=always \
mongo
$ yarn install
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
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.
- Author - Wang Nie
Nest is MIT licensed.