Library for arrange based projects
Last updated 3 months ago by hilderonny .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hilderonny/arrange 
SYNC missed versions from official npm registry.


Install MongoDB

For MacOS

Following this instruction: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap mongodb/brew
brew install mongodb-community@4.2
brew services start mongodb-community

Keep all settings on default.

For Windows

Use the MSI installer. When problems starting the service occur, it can be caused by falsy default settings. Have a look into https://stackoverflow.com/a/4663101/12127220 or simply create logs and data/db directories in the installation path.


Installation is done in that way.

npm i --save @hilderonny/arrange

Create an index.js file with the following content.

const arrange = require('@hilderonny/arrange');
const server = new arrange.Server(
    process.env.PORT || 8080, 
    process.env.DBURL || '',
    process.env.TOKENSECRET || 'mytokensecret'

Run the server with

node index.js

In the client HTML file of your project include arrange in this way.

        <script src="/arrange/arrange.js"></script>
            // Now you can access arrange functions via the $arr object
            window.addEventListener('load', async function() {
                // Create arrange instance connected to the local server
                // To connect to a different server, use const arr = Arrange('https://mydomain.com')
                const arr = Arrange();
                // Login to arrange
                await arr.login('myusername', 'password');
                // Fetch a list of all entities of the "models" table
                let modellist = await arr.list('models');

The API definition and usage examples can be found here.


Version Content
1.4.0 Moved to GitHub and updates dependencies
1.3.1 Bugfixes in client library
1.3.0 List API now supports result filters. Added client library documentation here
1.2.0 Added delete API
1.1.2 list and details API now return only publicly visible entities when user is not logged in
1.1.1 Newly created objects have the currently logged in user as owner
1.1.0 Implemented several APIs for first productive use including full tests
1.0.3 request.user._id is now a string for compatibility
1.0.2 Added APIs for user login and registration and authentication middleware
1.0.1 Initial NPM package without any functionality


Run tests

Locally on developer machine:

npm run testlocal

With GitHub Actions the actions are defined in .github/workflows/nodejs.yml. Originally I jave it from https://github.com/actions/example-services/issues/8#issuecomment-542487178 .

Howto create NPM package

npm install npm@latest -g
npm init --scope=@hilderonny
npm adduser
npm publish --access public

For all following deployments to NPM you need to update the version in the package.json file and run npm publish.

In dependent projects the lib can be updated to the newest version with npm up.


Current Tags

  • 1.4.0                                ...           latest (3 months ago)

11 Versions

  • 1.4.0                                ...           3 months ago
  • 1.3.1                                ...           a year ago
  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Today 0
This Week 1
This Month 2
Last Day 1
Last Week 0
Last Month 11
Dependencies (7)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |