{"id":31598400,"url":"https://github.com/lehaolin/mozi","last_synced_at":"2025-10-06T05:41:36.139Z","repository":{"id":205987026,"uuid":"715556385","full_name":"LehaoLin/mozi","owner":"LehaoLin","description":"The simplest and most practical Node.js backend template, suitable for quickly setting up small-scale backends. | 最爽的方式起个Nodejs小后端","archived":false,"fork":false,"pushed_at":"2024-02-09T10:56:13.000Z","size":96,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-27T10:45:50.147Z","etag":null,"topics":["backend","express","nedb","nodejs","restful","session-file-store"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LehaoLin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-07T11:35:54.000Z","updated_at":"2024-01-26T17:02:06.000Z","dependencies_parsed_at":"2023-11-07T13:26:38.261Z","dependency_job_id":"2b72034a-d296-40cb-93eb-132a6557b5f2","html_url":"https://github.com/LehaoLin/mozi","commit_stats":null,"previous_names":["lehaolin/mozi"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/LehaoLin/mozi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LehaoLin%2Fmozi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LehaoLin%2Fmozi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LehaoLin%2Fmozi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LehaoLin%2Fmozi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LehaoLin","download_url":"https://codeload.github.com/LehaoLin/mozi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LehaoLin%2Fmozi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278563105,"owners_count":26007336,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backend","express","nedb","nodejs","restful","session-file-store"],"created_at":"2025-10-06T05:41:30.594Z","updated_at":"2025-10-06T05:41:36.131Z","avatar_url":"https://github.com/LehaoLin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"The simplest and most practical Node.js backend template, suitable for quickly setting up small-scale backends.\n\n最爽的方式起个 Nodejs 小后端\n\n## Run the project\n\n`pnpm i`\n\n`pnpm dev`\n\n## DB: NEDB\n\nAll db operations are in `db.js`. And data is under `./data`\n\n- `db_connect` to create and connect db\n- `db_insert` to add data\n- `db_find` to return array of data\n- `db_remove` to remove data\n\nHow to export the data to json?\n\n- `export.js` to modify `name` variable and `pnpm export`\n\n## API\n\nYou can write backend APIs in `api.js`\nAnd socket APIs in `socket_api.js`\n\n## Session\n\nAll sessions store under the `./sessions`\n\n## Static File\n\nPlease place all static files under `./public`. And use url `/static/...` to access.\n\n## Full stack Development\n\n`pnpm vue`\n\nIt will create a frontend dir with a Vue Vite project named `frontend`.\n\nAnd you should modify the `api.js` to cancel the comment code beside `// for vue project inside`\n\n## Run Python file\n\nAll Python files should be under `pyscript`.\n\nRun shell `setup.sh` to setup the python enviroment.\n\nAnd please write python functions in `server.py`\n\nTo call the function, write in the `api.js` use the `call_py()` function.\n\n## Template Code\n\nYou can use it like template repo into new repos.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flehaolin%2Fmozi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flehaolin%2Fmozi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flehaolin%2Fmozi/lists"}