Git Product home page Git Product logo

melody's Introduction

melody

Build Status Coverage Status Community

simple, self-hosted publishing platform. #melody on Slack.

Quick Start

After running npm install, simply type npm start. If it's your first time, melody will automatically create an admin user and generate a random password.

Extra config values, such as character limit and allowing public registrations, are available in config/index.js for your convenience.

API

melody has a fully functional REST API, including an events API that is provided over WebSockets. To see documentation, visit your melody instance's API URL:

http://localhost:3000/api

This API is automatically provided by Maki, the web framework used to build melody.

Hosting

We strongly recommend using pm2 to manage melody in production. You can use the included melody.js to keep your instance named clearly. To run melody using pm2, simply:

pm2 start melody.js

Which will produce the following output:

┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid   │ status │ restart │ uptime │ memory      │ watching │
├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ melody   │ 0  │ fork │ 25957 │ online │ 0       │ 0s     │ 10.906 MB   │ disabled │
└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────────────┴──────────┘

See pm2 help for other instructions, such as startup scripts and monitoring.

Using as a Library

melody was built with Maki, so it can also be used as a library:

var melody = require('melody');

melody's People

Contributors

martindale avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

melody's Issues

First `npm start` exits after max call stack size exceeded

$ npm start

> [email protected] start /Users/asnodgrass/play/melody
> node melody.js

{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
[WARNING] Resource "Person" attribute `roles` has no type. You should consider adding one.
express-session deprecated undefined resave option; provide resave option node_modules/maki-passport-local/index.js:67:25
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option node_modules/maki-passport-local/index.js:67:25
[SERVICE] [HTTP] listening for [http]       on  http://:::3000
[SERVICE] [HTTP] listening for [https,spdy] on https://:::3363
{ [MongoError: no collection]
  name: 'MongoError',
  message: 'no collection',
  ok: 0,
  errmsg: 'no collection',
  code: 26 }
/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:423
                if (obj.hasOwnProperty(key)) {
                        ^

RangeError: Maximum call stack size exceeded
    at Object.hasOwnProperty (native)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:423:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)
    at _unobserve (/Users/asnodgrass/play/melody/node_modules/maki-mongoose-hooks/node_modules/fast-json-patch/src/json-patch-duplex.js:426:25)

npm ERR! Darwin 15.2.0
npm ERR! argv "/Users/asnodgrass/.nvm/versions/node/v4.1.0/bin/node" "/Users/asnodgrass/.nvm/versions/node/v4.1.0/bin/npm" "start"
npm ERR! node v4.1.0
npm ERR! npm  v3.3.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node melody.js`
npm ERR! Exit status 1

Allow Filtering of melody-posts Component

When using the <melody-posts> component, some degree of filtering should be possible. This will need to bubble up into the base <maki-collection> component for exposure to all applications.

For example, profile pages should display only posts from that specific user:
<melody-posts src="/posts" filter="{ _author: '56d4cd788ff9c07b5d0f2634' }"></melody-posts> for use on my public profile.

Assets Not Included

It seems that Maki's internal assets aren't being generated, and have to be manually added to a public/ folder for a melody-powered site to appear as designed.

Page Metadata Should Be Robot-Readable

More than just server-side rendering of resources, individual components should populate some metadata (such as Open Graph <meta> tags) to provide hints to robots attempting to crawl Melody-powered resources. This should also be implemented at the Maki level as a default behavior.

Example:
Pasting a permalink to a specific post, for example https://melody.ericmartindale.com/posts/56d4cf2f76e003326cdf2e3d – should display data about the post, not the overall site exclusively:
screenshot 2016-02-29 15 15 43

Author Names Fail To Display

When writing anything other than the very first post on a melody instance, martindale/maki#119 is encountered and author names fail to display. If the user clears their local datastore (by deleting the melody IndexedDB database), the usernames do in fact display correctly (since the local state is then synchronized with the edge node).

Easy fix is to always synchronize with the remote datastore (probably in <maki-datastore></maki-datastore>?).

Correct fix is to solve martindale/maki#119.

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.