Code Monkey home page Code Monkey logo

mac-chat-api's Introduction

mac-chat-api

Prebuilt api for slack app clone.

This project is the API for creating a slack clone. No need to understand any of code here. But if you are interested in taking your development skills to the next level, check out our API course.

How It Works
  1. User account creation and login are built-in using passport
  • Login at /v1/account/login
  • Create a new user account at /v1/account/register
  1. Ensure that you use the middleware function authenticated for each of your new routes on any request that must first have an authenticated user
  • Data that you want made to the public (without a user first loggin in) can omit the authenticated middleware
  1. Currently the express app assumes the database is on mLab using Heroku Deploy button at bottom. You can change the URL of the Mongo database to any location src/config/index.js
  2. For a full review on how this api works, checkout our Mac Course on the Devslopes platforms
Dependencies
  • npm - the package.json file lists all of the npm dependencies

Chat App REST API with ES6 and Express.

  • ES6 support via babel
  • Express is Node.js web application framework via express
  • Passport authentication for Node.js via passport
  • Socket.IO enables real-time bidirectional event-based communication via socket.io
  • Mongoose is a MongoDB object modeling tool via mongoose
  • Body Parsing via body-parser

Getting Started

Run a local instance

  • Go to src/config/index.js
  • change port to "port": 3005
  • change mongoUrl to "mongoUrl": "mongodb://localhost:27017/chat-api"
# Install dependencies
npm install

# Start local development live-reload server port 3005:
npm run dev

# Requests made in the form http://localhost:3005/v1/endpoint

# To build ES6 code
npm run build

Run a live online instance

  • Go to src/config/index.js
  • change port to "port": process.env.PORT
  • change mongoUrl to "mongoUrl": process.env.MONGODB_URI

You can also spin up a free Heroku dyno to test it out:

Deploy

MongoDB Community Edition on macOS

mac-chat-api's People

Contributors

jburgoyn avatar vmironiuk avatar cemck 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.