Code Monkey home page Code Monkey logo

nodejs-rest-http-crud's Introduction

Build Status Coverage Status Greenkeeper badge

Example CRUD Application

Getting Started

Running Locally

First, install the dependencies

npm install

A Postgres DB is needed, so if you are using Docker, then you can start a postgres db easily.

docker run --name os-postgres-db -e POSTGRESQL_USER=luke -e POSTGRESQL_PASSWORD=secret -e POSTGRESQL_DATABASE=my_data -d -p 5432:5432 openshift/postgresql-92-centos7

In this example, the db user is luke, the password is secret and the database is my_data

You can then start the application like this:

DB_USERNAME=luke DB_PASSWORD=secret ./bin/www

Then go to http://localhost:3000

Running on Minishift

First, make sure you have minishift setup and are logged in using oc login.

Then create a new project using the oc commands

oc new-project fun-node-fun

For this example, you will also need a postgres db running on your Minishift cluster.

oc new-app -e POSTGRESQL_USER=luke -ePOSTGRESQL_PASSWORD=secret -ePOSTGRESQL_DATABASE=my_data openshift/postgresql-92-centos7 --name=my-database

Then run npm run openshift to deploy your app

Then you can navigate to the newly exposed route, something similar to "http://nodejs-rest-http-crud-boosters.192.168.99.100.nip.io/", this will probably be different based on your Minishift IP address

nodejs-rest-http-crud's People

Contributors

lholmquist avatar greenkeeper[bot] avatar helio-frota avatar pmacik avatar akashshinde avatar greenkeeperio-bot avatar gastaldi avatar sbose78 avatar

Watchers

 avatar

Forkers

sahil143

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.