{"id":18084815,"url":"https://github.com/coderofsalvation/resourcejs-admin","last_synced_at":"2025-04-06T00:13:03.949Z","repository":{"id":57354748,"uuid":"81928923","full_name":"coderofsalvation/resourcejs-admin","owner":"coderofsalvation","description":"minimalistic Express.js library which turns one json-model into: mongoose models, REST endpoints, documentation \u0026 admin interface","archived":false,"fork":false,"pushed_at":"2020-05-28T19:25:13.000Z","size":4196,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T19:33:19.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2017-02-14T09:33:11.000Z","updated_at":"2020-05-28T19:24:18.000Z","dependencies_parsed_at":"2022-09-12T07:00:56.411Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/resourcejs-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fresourcejs-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fresourcejs-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fresourcejs-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fresourcejs-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/resourcejs-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415976,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T15:08:18.105Z","updated_at":"2025-04-06T00:13:03.927Z","avatar_url":"https://github.com/coderofsalvation.png","language":"JavaScript","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"minimalistic Express.js library which turns one json-model into: mongoose models,  REST endpoints,  documentation \u0026 admin interface\n\n![Build Status](https://travis-ci.org/coderofsalvation/resourcejs-admin..svg?branch=master)\n\n![](https://raw.githubusercontent.com/coderofsalvation/resourcejs-admin/master/demo.gif)\n\n## Usage\n\n    $ npm install mongoose resourcejs-admin express\n\nthen setup your express app like so:\n\n    var express = require('express')\n    var port = process.env.PORT || 3000\n    var mongoose = require('mongoose')\n    var config = require('./config.json')\n\n    mongoose.connect('mongodb://localhost/myapp'); \n\n    // Create a new Express application.\n    app = express()\n\n    // Setup database / rest endpoints / documentation / admin\n    require('resourcejs-admin')(express, app, config, \n      function(schema, name, config){  }   // you can decorate the mongoose schema's further here (http://mongoosejs.com/docs/2.7.x/docs/schematypes.html)\n      function(swagger){ }                 // you can decorate the swagger-spec here to extend the docs served at /doc\n    })\n\n    app.listen(port)\n\nand `config.json` like so:\n\n    {\n      \"title\":\"My app\", \n      \"logo\":\"/img/logo.png\", \n      \"users\":{\n        \"admin\": {\"password\":\"password\"}\n      }, \n      \"database\":{\n        \"user\":{\n          \"data\":{\n            \"id\": 1234, \n            \"username\":\"johndoe\", \n            \"email\":\"john@doe.com\", \n            \"displayName\":\"John Doe\", \n            \"data\":{}\n          }, \n          \"rest\":[\"get\", \"post\", \"put\", \"delete\", \"index\"]\n        }, \n        \"game\":{\n          \"data\":{\n            \"repository\":\"http://github.com/foo/bar\", \n            \"issues\":[1234, 143453, 1345]\n          }, \n          \"rest\":[\"get\", \"post\", \"put\", \"delete\", \"index\"]\n        }\n      }\n    }\n\n## Features\n\n* rest endpoints served basic on mongoose schemas (which are extracted from data in `config.json`)\n* easy configurable database schema by putting data-mocks into `config.json` \n* documentation served at `/doc`\n* admin panel served at `/admin`\n* basic http authentication (in progress)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fresourcejs-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fresourcejs-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fresourcejs-admin/lists"}