{"id":28415836,"url":"https://github.com/linuxvps22/ocr-eop","last_synced_at":"2025-08-14T21:15:52.246Z","repository":{"id":243707242,"uuid":"798863770","full_name":"linuxvps22/ocr-eop","owner":"linuxvps22","description":"An OCR api using Tesseract in Node js with tesseract.js library.","archived":false,"fork":false,"pushed_at":"2024-06-11T10:51:56.000Z","size":12710,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T02:38:47.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/linuxvps22.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-10T16:24:18.000Z","updated_at":"2025-05-21T17:23:26.000Z","dependencies_parsed_at":"2024-06-19T17:52:23.988Z","dependency_job_id":null,"html_url":"https://github.com/linuxvps22/ocr-eop","commit_stats":null,"previous_names":["dmhaui/ocr-eop","dnminh2003/ocr-eop","linux-vps/ocr-eop","linuxvps22/ocr-eop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuxvps22/ocr-eop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxvps22%2Focr-eop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxvps22%2Focr-eop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxvps22%2Focr-eop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxvps22%2Focr-eop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxvps22","download_url":"https://codeload.github.com/linuxvps22/ocr-eop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxvps22%2Focr-eop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270482381,"owners_count":24591343,"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-08-14T02:00:10.309Z","response_time":75,"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":[],"created_at":"2025-06-03T20:05:39.196Z","updated_at":"2025-08-14T21:15:52.228Z","avatar_url":"https://github.com/linuxvps22.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Node js API on AWS\r\nDeploy Node js API on AWS EC2 Instance\r\n\r\nGreat for testing simple deployments on Cloud, VPS\r\n\r\n## Step 1: Install NodeJS and NPM using nvm\r\nInstall node version manager (nvm) by typing the following at the command line.\r\n\r\n```bash\r\nsudo su -\r\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash\r\n```\r\nActivate nvm by typing the following at the command line.\r\n\r\n```bash\r\n. ~/.nvm/nvm.sh\r\n```\r\n\r\nUse nvm to install the latest version of Node.js by typing the following at the command line.\r\n\r\n```bash\r\nnvm install node\r\n```\r\n\r\nTest that node and npm are installed and running correctly by typing the following at the terminal:\r\n\r\n```bash\r\nnode -v\r\nnpm -v\r\n```\r\n\r\n## Step 2: Install Git and clone repository from GitHub\r\nTo install git, run below commands in the terminal window:\r\n\r\n```bash\r\nsudo apt-get update -y\r\nsudo apt-get install git -y\r\n```\r\nor \r\n```bash\r\nsudo yum update -y\r\nsudo yum install git -y\r\n```\r\n\r\nJust to verify if system has git installed or not, please run below command in terminal:\r\n```bash\r\ngit --version\r\n```\r\n\r\nThis command will print the git version in the terminal.\r\n\r\nRun below command to clone the code repository from Github:\r\n\r\n```bash\r\ngit clone https://github.com/dmhaui/ocr-eop.git\r\n```\r\n\r\nGet inside the directory and Install Packages\r\n\r\n```bash\r\ncd ocr-eop\r\nnpm install\r\n```\r\n\r\nStart the application\r\nTo start the application, run the below command in the terminal:\r\n\r\n```bash\r\nnpm start\r\n```\r\n\r\n# Keep the api alive\r\nNow, we will need to run the api 24/24 even when the EC2 console is closed\r\n\r\nWhen you close the console tab in web view, even though the instance is still running, the code will not function properly\r\n\r\n## Step 1: Install PM2\r\nPM2 will help us continue running our code even after the terminal is closed\r\n\r\nInstall PM2 by typing the following at the command line.\r\n\r\n```bash\r\nnpm install pm2 -g \u0026\u0026 pm2 update\r\n```\r\n\r\n## Step 2: Run the code by PM2\r\n\r\n\r\n### Here are some basic commands for PM2:\r\n\r\npm2 start app.js: Start a Node.js application.\r\n\r\npm2 stop app: Stop a running application.\r\n\r\npm2 restart app: Restart an application.\r\n\r\npm2 list: List all running processes.\r\n\r\npm2 monit: Display a monitoring interface for all running processes.\r\n\r\npm2 logs: View logs of running processes.\r\n\r\npm2 delete app: Remove a process from PM2.\r\n\r\n\r\n### In this project, we will use PM2 to start the server.js file:\r\n\r\n```bash\r\npm2 start server.js\r\n```\r\n\r\n### Retrieve all processes managed:\r\n\r\n```bash\r\npm2 list\r\n```\r\n\r\nWe will see our server.js file displayed in a table.\r\n\r\n### To stop, we can use either the name or the ID from the previous table:\r\n\r\n```bash\r\npm2 stop 0\r\n```\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxvps22%2Focr-eop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxvps22%2Focr-eop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxvps22%2Focr-eop/lists"}