Code Monkey home page Code Monkey logo

app-backend's Introduction

License: MIT GitHub package.json version Travis (.org) branch Libraries.io dependency status for GitHub repo GitHub contributors GitHub commit activity

Coding Garden Community App API

This repository contains the source files and documentation for the API of the Coding Garden Community App. For more information about the Community App please visit the App Wiki.

Running the API locally

NOTE: If you find yourself in some trouble going through this, reach out to us directly on our Discord server.

Prerequisites

  1. NodeJS:
    Please install NodeJS >= 10.15.0. If you already have it, you're good to go.

  2. Yarn:
    Visit Yarn download page. Select your Operating system and follow the instructions. It's as easy as eating a ๐Ÿฐ.

  3. EditorConfig:
    Please visit EditorConfig -> Download a Plugin section and scroll through to see if you need to install an additional Plugin/Extension for your code editor or IDE. If your IDE needs one, you should be able to find a link to that plugin/extension on that page.

    This prerequisite is directly related to: .editorconfig in the root directory of this project.

    More About EditorConfig:
    EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.


Once you have the Prerequisites covered:

  1. Clone this repository from GitHub onto your local computer.

    $ git clone https://github.com/CodingGardenCommunity/app-backend.git
  2. Navigate into the project folder and install all of its necessary dependencies with Yarn.

    $ cd app-backend
    $ yarn install
  3. Install MongoDB and make sure it's running

  4. Make a copy of .env.sample and rename it to .env. You can do so with this simple command:

    NOTE: If you are using Windows Command Prompt, you need to use copy instead of cp.

    $ cp .env.sample .env

    You don't need to change any values in .env file. The default values work well for development purposes.

  5. Once you have MongoDB and .env file ready, seed the local database by running:

    $ yarn run seed
  6. To make sure everything is setup properly, run tests.

    $ yarn run test

    If all tests pass, we can safely conclude that setup is complete and its working as expected. ๐Ÿ™Œ Wooh!!
    If not, don't worry. We are together on this mission!! Reach out to us on our Discord server.

  7. Once that's done, tap your back. You are ready to start contributing ๐Ÿ˜ƒ
    You can run -

    $ yarn run dev

    to start the server.

You can now visit http://localhost:3000/ to view the APIs.

Further, checkout package.json file to learn about (more) available scripts/commands.

Happy coding! ๐Ÿฅ‚

Dependencies used

  • Express: Web application framework designed for building web applications and APIs.
  • mongoose: Schema based object modeling for mongoDB.
  • joi: Object schema validation library.
  • CORS: Express middleware to enable CORS functionalities.
  • dotenv: For setting environment variables.
  • Swagger UI Express: Auto-generated API docs, based on a swagger.json file.
  • ESLint: Code linter. Analyses the code for potential errors.
    • This project uses ESLint in conjunction with another dependency called "eslint-config-airbnb" for implementing the airbnb set of rules helping to write clean javascript.
  • Jest: For testing.

app-backend's People

Contributors

spiray avatar tejas-hosamani avatar w3cj avatar nmigueles avatar dependabot[bot] avatar edvinbasil avatar jbrundage avatar rabbitwerks avatar andcotoli avatar ewenjo avatar snordmann avatar xyli0 avatar eckhardt-d avatar

Watchers

James Cloos 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.