All Projects → sasha7 → Notes App

sasha7 / Notes App

Licence: mit
Node.js application - simple notes management using Express, Postgres, Objection.js, Docker, Socket.io, Bluebird Promises

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Notes App

Gemini
Model Driven REST framework to automatically generate CRUD APIs
Stars: ✭ 138 (+885.71%)
Mutual labels:  api-rest, postgresql
Aceql Http
AceQL HTTP is a framework of REST like http APIs that allow to access to remote SQL databases over http from any device that supports http.
Stars: ✭ 68 (+385.71%)
Mutual labels:  api-rest, postgresql
Gympoint Api
Rest API of a gym management application - built with Express, Postgres, Redis, and Nodemailer.
Stars: ✭ 39 (+178.57%)
Mutual labels:  api-rest, postgresql
Sqler
write APIs using direct SQL queries with no hassle, let's rethink about SQL
Stars: ✭ 1,943 (+13778.57%)
Mutual labels:  api-rest, postgresql
Servicebot
Open-source subscription management & billing automation system
Stars: ✭ 857 (+6021.43%)
Mutual labels:  postgresql
Massive
A Module for Utilizing MassiveJS with NestJS
Stars: ✭ 27 (+92.86%)
Mutual labels:  postgresql
Chingudevelopersnetwork
The Zoo
Stars: ✭ 26 (+85.71%)
Mutual labels:  postgresql
Project Dashboard With Django
Agile Project Management dashboard with Django REST and Vue.js
Stars: ✭ 25 (+78.57%)
Mutual labels:  postgresql
Analytics
Simple, open-source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
Stars: ✭ 9,469 (+67535.71%)
Mutual labels:  postgresql
Monogamy
Add table-level database locking to ActiveRecord
Stars: ✭ 12 (-14.29%)
Mutual labels:  postgresql
Go Kallax
Kallax is a PostgreSQL typesafe ORM for the Go language.
Stars: ✭ 853 (+5992.86%)
Mutual labels:  postgresql
Migrator
Opinionated database migration library for Go applications.
Stars: ✭ 7 (-50%)
Mutual labels:  postgresql
Netkiller.github.io
Netkiller Free ebook - 免费电子书
Stars: ✭ 861 (+6050%)
Mutual labels:  postgresql
Mongo Connector Postgresql
River from Mongo oplog to postgresql
Stars: ✭ 26 (+85.71%)
Mutual labels:  postgresql
Geochile
Esta es una api de Geocodificación, para que, con las coordenadas Latitud y Longitud se entregue una lista de ciudades cercanas.
Stars: ✭ 13 (-7.14%)
Mutual labels:  api-rest
Postgresql exporter
A Prometheus exporter for some postgresql metrics
Stars: ✭ 26 (+85.71%)
Mutual labels:  postgresql
Online Bling
Stars: ✭ 9 (-35.71%)
Mutual labels:  postgresql
Copostgresquery
Query builder for PostgreSQL in Node.js, built for async
Stars: ✭ 12 (-14.29%)
Mutual labels:  postgresql
Pgweb
Cross-platform client for PostgreSQL databases
Stars: ✭ 7,114 (+50714.29%)
Mutual labels:  postgresql
Ridgepole
Ridgepole is a tool to manage DB schema. It defines DB schema using Rails DSL, and updates DB schema according to DSL. (like Chef/Puppet)
Stars: ✭ 840 (+5900%)
Mutual labels:  postgresql

notes-app

Node.js application for managing notes.

This repo serves as a playground for the following technologies:

  • Node.js
  • Express framework
  • Objection.js ORM
  • PostgresSQL
  • Socket.io
  • EventEmitter
  • Unit and Functional Testing
  • Running the app with Docker
  • Remote debugging with Chrome DevTools or Visual Studio Code using node --inspect option with latest Node.js version

Before installing make sure you have Node version >= 5.0 and NPM >= 3 and that PostgreSQL has "uuid-ossp" module installed as an extension:

  • SELECT * FROM pg_available_extensions;
  • CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
  • createdb notes_development
  • createuser postgres

Instead of installing Postgres and Node on your local machine, you can use Docker!

Features

  • New account signup using email and password or OAuth provider (Facebook)
  • Reset password feature
  • Notes CRUD pages
  • My profile page with extra option to link/unlink OAuth provider
  • Automatic updating of notes list on /notes page when anyone updates, deletes or creates new note
  • Contact form
  • Simple API examples /api/v1/users, /api/v1/notes

Quick start

# clone our repo
# --depth 1 removes all but one .git commit history
git clone --depth 1 https://github.com/sasha7/notes-app.git

# change directory to our repo
cd notes-app

# install the repo with npm
npm install

# run setup.js to setup initial environment in .env file
npm run setup

# create postgres db
createdb --encoding utf8 notes-development

# start the server

npm start

# or start the server in watch mode using nodemon with support for debugging

npm run watch

go to http://0.0.0.0:3000 or http://localhost:3000 in your browser

Running the app with Docker

Use docker-compose up which will run two containers:

  • Node App with latest Node.js version
  • Postgres DB server
# start docker containers
docker-compose up

# after docker containers are ready, login to notesapp container and run migrations
$ docker exec -it $(docker ps | grep notesapp_notesapp | awk '{ print $1 }') bash
npm run db:migrate

# stop docker containers
docker-compose stop

REST API Example usage

# You can pretty print json responses by using pipe operator and
# the following commands: `| python -mjson.tool` or `| jq`.
# If needed, install `jq`in OSX: `brew install jq`

# All note ids are using UUIDv4

# GET a list of notes
curl \
--request GET \
http://localhost:3000/api/v1/notes

# Get a single note
curl \
--request GET \
http://localhost:3000/api/v1/notes/:id

# Create a single note
curl \
--header "Content-Type: application/json" \
--request POST \
--data '{"title": "Test Title", "body": "Test note"}' \
http://localhost:3000/notes

# Update a note
curl \
--header "Content-type: application/json"
--request PUT \
--data '{"title:": "Updated title", "body": "Updated note"}' \
http://localhost:3000/notes/:id

# Delete a note
curl \
--header "Content-type: application/json" \
--request DELETE \
http://localhost:3000/notes/:id

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].