{"id":21672513,"url":"https://github.com/redis-developer/redis-om-node-skeleton-app","last_synced_at":"2026-04-12T09:04:36.313Z","repository":{"id":104843915,"uuid":"464629505","full_name":"redis-developer/redis-om-node-skeleton-app","owner":"redis-developer","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-08T19:21:49.000Z","size":124,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-25T09:27:38.077Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redis-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-28T20:12:48.000Z","updated_at":"2023-10-07T19:51:24.000Z","dependencies_parsed_at":"2023-11-29T22:30:30.022Z","dependency_job_id":null,"html_url":"https://github.com/redis-developer/redis-om-node-skeleton-app","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/redis-developer%2Fredis-om-node-skeleton-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fredis-om-node-skeleton-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fredis-om-node-skeleton-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redis-developer%2Fredis-om-node-skeleton-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redis-developer","download_url":"https://codeload.github.com/redis-developer/redis-om-node-skeleton-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244576957,"owners_count":20475218,"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-11-25T13:29:46.269Z","updated_at":"2026-04-12T09:04:36.276Z","avatar_url":"https://github.com/redis-developer.png","language":"JavaScript","readme":"# Redis OM + Express Skeleton Application\n\nDo you want to build an API using Express and Redis OM but just don't have the time? Well, this repo is the repo for you! Just clone it, get some Redis, and modify to taste.\n\nWhat is this repo? It's a small, fully functional API written in Express that uses Redis as its primary database and uses Redis OM as a convenient way to access that primary database. It's chock full of examples that you can learn from, modify, and use in your own applications.\n\nDid I mention that it's fully functional? Yep. So let's get this thing a-functioning!\n\n## Prerequisites\n\nBefore we can get this application up and running, we need to install a few things. Nothing major, just a recent version of Node.js and some sweet, sweet Redis.\n\n## Node.js\n\nThis is an Express application that uses Redis OM for Node.js. So—as you might imagine—it needs Node.js. However, I also took advantage of the [top-level await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#top_level_await) feature in newer versions of JavaScript. So, you'll need to use a newer version of Node.js, Specifically 14.8 or later. I used version 16.3, which is listed in the `.nvmrc` file.\n\nSpeaking of an `.nvmrc` file, I like to use [`nvm`](https://github.com/nvm-sh/nvm). It's a tidy way to manage various Node.js versions on my machine. And, if you use `nvm` you can just enter...\n\n```bash\nnvm install `cat .nvmrc`\n```\n\n...to install that version of Node.js and...\n\n```bash\nnvm use\n```\n\n...to enable it.\n\nBut you don't have to do that. Install Node.js however you want as long as it's version 14.8 or later. Don't let me tell you how to live your life.\n\n### Redis\n\nWe're using Redis as the database so you need some Redis. And not just any old Redis. You need Redis with some modules loaded. And maybe with a nice GUI that lets you interact with that data. By far the easiest way to do that is to install Redis Stack. So [go get some of that](https://hub.docker.com/repository/docker/redislabs/redis-stack).\n\n## Up and Running\n\nFind a nice place on your computer and clone this repo:\n\n```bash\ngit clone git@github.com:redis-developer/redis-om-node-skeleton-app.git\n```\n\nIn the root of the folder, there's a `sample.env` file. Copy that file to `.env` in the same place and you should be ready to go:\n\n```bash\ncp sample.env .env\n```\n\nThis file contains the configuration for the Redis URL to your Redis and the port the application listens on. The defaults are `redis://localhost:6379` and `8080` and these should be just fine. But, if you want to run Redis elsewhere or you want to change the port the API listens on, feel free to mess with them.\n\nYou also need to install all the Node.js packages the application uses. Packages like Redis OM and Express. You know, the things this sample application is showing you how to use.\n\nYou probably know what happens next, but just in case:\n\n```bash\nnpm install\n```\n\nYou have Redis and Node.js. You have the code. Everything is configured and installed. Now, you should be able to run the application. So let's do that:\n\n```bash\nnpm start\n```\n\nAnd it's running! Now what?\n\n## Using the API\n\nSo, the API is up. You can interact with it and explore a bit using Swagger. Just point your browser at http://localhost:8080 and start poking around.\n\nBut, without any data, it's not that inspiring. No worries, I got you. In the `persons` folder, I have created several JSON files with data ready to post to the API. You can copy the contents of these files and `PUT` persons if you like (and you should) but it's easier to load all of this data at once by running the `load-data.sh` script:\n\n```bash\ncd persons\n./load-data.sh\n```\n\nAnd just like that, you have a small set of persons to search for.\n\n## Wrapping Up\n\nAnd that's pretty much it. The Swagger stuff describes the API. Look in the code and see how it all works. Most of it is pretty self-explanitory and where it isn't I've placed comments to help guide you. If I haven't put any comments *and* it's not clear, feel free to reach out. Open an issue here on GitHub or hop on the [Redis Discord server](https://discord.gg/redis) and ask there.\n\nThanks for using my code and happy coding!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-developer%2Fredis-om-node-skeleton-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredis-developer%2Fredis-om-node-skeleton-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredis-developer%2Fredis-om-node-skeleton-app/lists"}