{"id":16175473,"url":"https://github.com/app-generator/api-server-nodejs-demo","last_synced_at":"2026-05-09T15:18:02.584Z","repository":{"id":100502742,"uuid":"562426194","full_name":"app-generator/api-server-nodejs-demo","owner":"app-generator","description":"Nodejs API \u0026 React - Deploy LIVE on Render | AppSeed","archived":false,"fork":false,"pushed_at":"2022-11-06T11:01:53.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T18:12:46.117Z","etag":null,"topics":["appseed","deployment","nodejs","reactjs"],"latest_commit_sha":null,"homepage":"https://youtu.be/3yWGhJiOWRc","language":"TypeScript","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/app-generator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-06T10:24:12.000Z","updated_at":"2022-11-06T11:02:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2ec3295-9fcc-4228-893d-01ebd683c2df","html_url":"https://github.com/app-generator/api-server-nodejs-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"app-generator/api-server-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fapi-server-nodejs-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fapi-server-nodejs-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fapi-server-nodejs-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fapi-server-nodejs-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/api-server-nodejs-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640468,"owners_count":20971558,"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":["appseed","deployment","nodejs","reactjs"],"created_at":"2024-10-10T04:44:55.064Z","updated_at":"2026-05-09T15:18:02.530Z","avatar_url":"https://github.com/app-generator.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# [Nodejs API Server](https://appseed.us/boilerplate-code/nodejs-starter/)\n\nExpress / [Nodejs Starter](https://appseed.us/boilerplate-code/nodejs-starter/) with JWT authentication, and **SQLite** persistance - Provided by **AppSeed** [App Generator](https://appseed.us).\nAuthentication Flow uses `json web tokens` via Passport library - `passport-jwt` strategy.\n\n\u003cbr /\u003e\n\n---\n\n👉 Learn how to [deploy this product LIVE on Render](https://youtu.be/3yWGhJiOWRc) using the [Python Deployer](https://github.com/app-generator/deploy-automation-render) (free tool)\n\n---\n\n\u003cbr /\u003e\n\n\u003e Features:\n\n- ✅ [API Definition](https://docs.appseed.us/boilerplate-code/api-unified-definition) - the unified API structure implemented by this server\n- ✅ Simple, intuitive codebase - can be extended with ease.  \n- ✅ `TypeScript`, `Joy` for validation\n- ✅ **Stack**: NodeJS / Express / SQLite / TypeORM\n- ✅ Auth: Passport / `passport-jwt` strategy \n\n\u003cbr /\u003e\n\n\u003e Tested with:\n\n| NodeJS | NPM | YARN | \n| --- | --- | --- | \n| `v18.0.0`  | ❌ | ✅ |\n| `v17.0.0`  | ❌ | ✅ |\n| `v16.13.0` | ❌ | ✅ | \n| `v16.0.0`  | ❌ | ❌ | \n\n\u003cbr /\u003e\n\n\u003e Can be used with other [React Starters](https://appseed.us/apps/react) for a complete **Full-Stack** experience:\n\n| [React Node JS Berry](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/) | [React Node Soft Dashboard](https://appseed.us/product/soft-ui-dashboard/api-server-nodejs/react/) | [React Node Horizon](https://appseed.us/product/horizon-ui/api-server-nodejs/) |\n| --- | --- | --- |\n| [![React Node JS Berry](https://user-images.githubusercontent.com/51070104/176936514-f1bccb21-bafe-4b43-9e4c-b6fe0ec9511d.png)](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/) | [![React Node Soft Dashboard](https://user-images.githubusercontent.com/51070104/176936814-74386559-4e05-43d5-b9a4-8f70ce96a610.png)](https://appseed.us/product/soft-ui-dashboard/api-server-nodejs/react/) | [![React Node Horizon](https://user-images.githubusercontent.com/51070104/174428337-181e6dea-0ad9-4fe1-a35f-25e5fa656a9d.png)](https://appseed.us/product/horizon-ui/api-server-nodejs/)\n\n\u003cbr /\u003e\n\n![Nodejs API Server - Open-source Nodejs Starter provided by AppSeed.](https://user-images.githubusercontent.com/51070104/124414813-142aa180-dd5c-11eb-9279-6b082dadc51a.png)\n\n\u003cbr /\u003e\n\n## ✨ Requirements\n\n- [Node.js](https://nodejs.org/) \u003e= v16.13\n- [SQLite](https://www.sqlite.org/index.html)\n\n\u003cbr /\u003e\n\n## ✨ How to use the code\n\n\u003e **Step 1** - Clone the project\n\n```bash\n$ git clone https://github.com/app-generator/api-server-nodejs.git\n$ cd api-server-nodejs\n```\n\n\u003cbr /\u003e\n\n\u003e **Step 2** - Install dependencies via `Yarn`\n\n```bash\n$ yarn\n```\n\n\u003cbr /\u003e\n\n\u003e **Step 3** - Run the SQLite migration via TypeORM\n\n```\n$ yarn typeorm migration:run\n```\n\n\u003cbr /\u003e\n\n\u003e **Step 4** - Start the API server (development mode)\n\n```bash\n$ yarn dev\n```\n\n\u003cbr /\u003e\n\n\u003e **Step 5** - Production Build (files generated in `build` directory)\n\n```bash\n$ yarn build\n```\n\n\u003cbr /\u003e\n\n\u003e **Step 6** - Start the API server for production (files served from `build/index.js`)\n\n```bash\n$ yarn start\n```\n\nThe API server will start using the `PORT` specified in `.env` file (default 5000).\n\n\u003cbr /\u003e\n\n## ✨ Codebase Structure\n\n```bash\n\u003c ROOT / src \u003e\n     | \n     |-- config/                              \n     |    |-- config.ts             # Configuration       \n     |    |-- passport.ts           # Define Passport Strategy             \n     | \n     |-- migration/\n     |    |-- some_migration.ts     # database migrations\n     |\n     |-- models/                              \n     |    |-- activeSession.ts      # Sessions Model (Typeorm)              \n     |    |-- user.ts               # User Model (Typeorm) \n     | \n     |-- routes/                              \n     |    |-- users.ts              # Define Users API Routes\n     | \n     | \n     |-- index.js                   # API Entry Point\n     |-- .env                       # Specify the ENV variables\n     |                        \n     |-- ************************************************************************\n```\n\n\u003cbr /\u003e\n\n## ✨ SQLite Path\n\nThe SQLite Path is set in `.env`, as `SQLITE_PATH`\n\n\u003cbr /\u003e\n\n## ✨ Database migration\n\n\u003e Generate migration:\n\n```bash\n$ yarn typeorm migration:generate -n your_migration_name\n```\n\n\u003e run migration: \n\n```bash\n$ yarn typeorm migration:run\n```\n\n\u003cbr /\u003e\n\n## ✨ API\n\nFor a fast set up, use this POSTMAN file: [api_sample](https://github.com/app-generator/api-server-nodejs-pro/blob/master/media/api.postman_collection.json)\n\n\u003e **Register** - `api/users/register`\n\n```\nPOST api/users/register\nContent-Type: application/json\n\n{\n    \"username\":\"test\",\n    \"password\":\"pass\", \n    \"email\":\"test@appseed.us\"\n}\n```\n\n\u003cbr /\u003e\n\n\u003e **Login** - `api/users/login`\n\n```\nPOST /api/users/login\nContent-Type: application/json\n\n{\n    \"password\":\"pass\", \n    \"email\":\"test@appseed.us\"\n}\n```\n\n\u003cbr /\u003e\n\n\u003e **Logout** - `api/users/logout`\n\n```\nPOST api/users/logout\nContent-Type: application/json\nauthorization: JWT_TOKEN (returned by Login request)\n\n{\n    \"token\":\"JWT_TOKEN\"\n}\n```\n\n\u003cbr /\u003e\n\n## ✨ Run the Tests\n\n```yarn test```\n\n\u003cbr /\u003e\n\n\n## ✨ Credits\n\nThis software is provided by the core AppSeed team with an inspiration from other great NodeJS starters: \n\n- Initial verison - coded by [Teo Deleanu](https://www.linkedin.com/in/teodeleanu/)\n- [Hackathon Starter](https://github.com/sahat/hackathon-starter) - A truly amazing boilerplate for Node.js apps\n- [Node Server Boilerplate](https://github.com/hagopj13/node-express-boilerplate) - just another cool starter\n- [React NodeJS Argon](https://github.com/creativetimofficial/argon-dashboard-react-nodejs) - released by **Creative-Tim** and [ProjectData](https://projectdata.dev/)\n\n\u003cbr /\u003e\n\n---\n**[Node JS API Server](https://appseed.us/boilerplate-code/nodejs-starter/)** - provided by AppSeed [App Generator](https://appseed.us)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fapi-server-nodejs-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Fapi-server-nodejs-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fapi-server-nodejs-demo/lists"}