Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonapi-express-backend

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonapi-express-backend

JSONAPI backend based on Express and MySQL

  • 0.5.38
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

JSONAPI Express.js / MySQL backend

Live demo

A simple blog app: https://ember-blog.info/about. It still has many bugs (like: no redirection after login) but should work. Feedback is welcome.

Backend code for this demo app is here, frontend code is here.

Fair bit of warning

This is work in progress, and not production-ready (yet). That being said, it does the job, for me at least :).

Please don't hesitate to contact me if you run into issues while giving this project a try. As I am currently working on it heavily, I will definitely answer your request. Besides, documentation is on its way, a user guide will be provided soon.

About this project

This project began as a standalone Express app, that I just started turning into an NPM module.

The motivation for it is to have a simple-to-use backend for Ember.js.

An example project is available at https://github.com/bhubr/jsonapi-express-backend-demo. It demonstrates how to configure the module by providing those parameters:

  • public&private keys path
  • db settings
  • model relationships descriptors

Install

npm install --save jsonapi-express-backend

Features

  • MySQL support. Works with MariaDB (actually only tested on MariaDB). More (PostgreSQL) might come after.
  • Dead-simple. No ORM, but simple query-building using Squel.
  • Uses JSON Web Tokens for authentication.
  • Supports one-to-one, one-to-many, many-to-many model relationships.

Limitations

  • As of now, you have to create your MySQL schema by hand. It has to respect some conventions as to table and field naming:
    • primary key for all tables is id
    • each data type (that is, all tables but the pivot tables) must have createdAt and updatedAt fields.

Naming conventions

  • Model / table names
    • model: super-duper-model (Ember)
    • plural: super-duper-models ** (Ember, Backend)
    • singular: superDuperModel (Backend)
    • plural: superDuperModels (??)
    • table: super_duper_models (Backend)
  • Beware of inflection
    • niceCity => niceCities

FAQs

Package last updated on 21 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc