Skip to content

aliazmoodehvaldi/Social-Network

Repository files navigation

Social-Network-Server

Table of Contents

Install

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.6 or higher is required.

Installation is done using the npm install command:

Now download and extract project Direct link

Introduction

A simple social network with socket.io and rest api in nest.js

Api Schema

In this project, two libraries are used for documentation and display and display with api. For Restful Api (swagger) and For Socket.io (OpenRTP)

URL Schema

Rest Api => http://localhost:3000/apiDocs

Socket.io => http://localhost:17892/socket-docs

Database

This app has used two databases (mongodb, redis) for development

Schema

For more information about the database structure, refer to this repository

Installation

$ npm i

Configuration

Open cmd and run the following commands.

node cmd.js serve
  • Create new database with this name social_network
  • Create new collection with this name users

You can change database and collection name in .env file and create your own database

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# end to end tests
$ npm run test:e2e

Licensing

The code in this project is licensed under the MIT