项目作者: markieo1

项目描述 :
A node backend providing functionality that looks like slack. Including users, groups and messages.
高级语言: TypeScript
项目地址: git://github.com/markieo1/node-slack-clone-backend.git
创建时间: 2017-12-04T10:03:43Z
项目社区:https://github.com/markieo1/node-slack-clone-backend

开源协议:

下载


Node Slack Clone

Node / Express application with support for

  • Users (CRUD)
  • Groups (CRUD)
  • Messages in groups

Requirements

  • Node >= 8.x

Installation

  1. npm install

Configuration

Variable Default Description
PORT 3000 The port on which to listen for requests.
MONGODB_URI mongodb://localhost:27017/test The URI to connect to mongodb. Include username and password in this.
ALLOW_ORIGIN * Determines from which URl requests are allowed (CORS).
SECRET somesecret The secret to use for signing the JWT token.
JWT_EXPIRES 1d Determines the expiry of the JWT token. Expressed in seconds or a string describing a time span zeit/ms.

Usage

  1. $ npm run
  2. build - Builds the project,
  3. start - Builds and starts the project
  4. start.dev - Builds and starts the projects. Also monitors the src folder for changes and restarts on change.
  5. start.prod - Builds and starts the projects with NODE_ENV set to production.
  6. test - Builds and runs the tests.

Running Locally

Make sure you have Node.js installed.

  1. npm install
  2. npm start

Your app should now be running on localhost:3000.