Git Product home page Git Product logo

bookmarks-api's Introduction

API for www.bookmarks.dev, the Bookmark Manager for Developers & Co

This repo contains the back-end API source code of the www.bookmarks.dev website.

Bookmarks Context

This project is developed with the MEAN stack, featuring MongoDB, ExpressJS, Angular and NodeJS. Authentication and authorization is done via Keycloak:

Network Diagram


Development setup

You need mongodb, keycloak and nodejs to get the api working

Prerequisites

What you need to run this app:

  • node and npm (we recommend using NVM)
  • Ensure you're running Node at least (v6.x.x+) and NPM (3.x.x+)

MongoDB

Follow the instructions from the Mongo DB documentation and install version 3.2 on your local machine. Connect to the mongo client:

# change to mongo installation directory
$ cd MONGO_HOME

# run the mongo client
$ ./bin/mongo

and then create the codingpedia-bookmarks database:

# change to mongo installation directory
> use codingpedia-bookmarks

# verify that is present

> show dbs;
admin                  0.000GB
codingpedia-bookmarks  0.000GB
keycloak               0.001GB
local                  0.000GB

Keycloak

This is the heaviest step, we need to set up for development. But by using Keycloak we get lots of things like Single-Sign On, OpenId-Connect Support, social logins, user admin console, that otherwise would take lots of effort to implement by ourselves. To make our life easier, I have prepared a wiki page about Keycloak Setup For Development.

Installation and develop on local machine

Create an env.json file based on the the env.example.json example. You don't need to configure the production part.

# clone backend repo
$ git clone https://github.com/Codingpedia/bookmarks-api.git

# change directory to the app
$ cd bookmarks-api

# use the preconfigured node version
$ nvm use

# install the dependencies with npm
$ npm install

# start the server with nodemon, so that changes in the dynamically reflected
$ DEBUG=bookmarks-api:* nodemon start

Testing

Run the integration test by issuing the following command.

$ npm run integration-tests

For the tests to run the development environment has to be set up

Swagger docs

Note

  • env.json is not commit but needs to be delivered at build time

License

MIT

bookmarks-api's People

Contributors

adixchen avatar

Watchers

 avatar  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.