Code Monkey home page Code Monkey logo

simple-social-network-api's Introduction

Oladipo Social App

Introduction

This is a RESTful API built using Node.js, Express, TypeScript, Redis and PostgreSQL.


Setup

Clone the repository to your local machine.

git clone https://github.com/dipo0x/social-network

Ensure that you have NodeJS, PostgreSQL and Redis on your machine. You could use their cloud services. Navigate to the root directory of the project in a terminal.

cd social-network

Run the following command to install the necessary dependencies

npm install

Add a .env file following .env.example file example with the values of each variable

DATABASE_URL
PORT
NODE_ENV
ACCESSTOKENKEY 
REDIS_HOST
ACCESSTOKENEXPIRESIN
SERVER_NAME
REDIS_PORT
REDIS_PASSWORD

Run the following command run tests

npm run tests

Running Server

Locally

Run the following command to start the server:

    npm run dev

The server will run on http://localhost:3000 by default

Available Endpoints

Base URL[dev]: http://0.0.0.0:3000/api/v1

### Errors

The response for request failures or any other error are rather simple.

```json
{
    "status": 400,
    "success": false,
    "message": "Post with this title already exist"
}

Conclusion

You can find additional documentation for this API, including request and response signatures, by visiting https://cloudy-firefly-771216.postman.co/workspace/Private-test~483e9aa2-2981-4b0d-ad0b-a023b9c5ad17/collection/24812037-6f15c10a-6c9b-485d-b365-19011010adaa?action=share&creator=24812037 in your web browser.

simple-social-network-api's People

Contributors

dipo0x avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.