{"id":18783424,"url":"https://github.com/futuresea-dev/express-movie-ticket-api","last_synced_at":"2026-04-18T17:02:30.049Z","repository":{"id":157980019,"uuid":"633754467","full_name":"futuresea-dev/express-movie-ticket-api","owner":"futuresea-dev","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-28T07:52:26.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-29T11:44:43.871Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/futuresea-dev.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":"2023-04-28T07:50:52.000Z","updated_at":"2023-04-28T07:52:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"ac6db529-b23b-48c8-a5a8-4f0f42031ab7","html_url":"https://github.com/futuresea-dev/express-movie-ticket-api","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/futuresea-dev%2Fexpress-movie-ticket-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuresea-dev%2Fexpress-movie-ticket-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuresea-dev%2Fexpress-movie-ticket-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuresea-dev%2Fexpress-movie-ticket-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futuresea-dev","download_url":"https://codeload.github.com/futuresea-dev/express-movie-ticket-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239699579,"owners_count":19682574,"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-07T20:39:18.591Z","updated_at":"2025-12-20T15:30:20.675Z","avatar_url":"https://github.com/futuresea-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal User Handling using Express.js and PostgreSQL\n\n## Getting Started\nHere is what you need to get it up and running:\n\n## Pre-requisite\n1. A running PostgreSQL Server\n2. An empty DB on the PostgreSQL\n3. `node` and `npm` installed\n4. Postman or cURL (for testing the API)\n5. A free `8080` PORT (you may change the port in `server.js`)\n\n## Installation\n1. Clone the repo\n\n```bash\ngit clone https://github.com/cstayyab/express-psql-login-api.git\ncd express-psql-login-api\n```\n2. Install the dependencies\n\n```bash\nnpm install\n```\n## Configuration\nYou will have to update some values in `config/db.config.js`\n\n|key|description|\n|---|-----------|\n|HOST| your host address on which postgreSQL is installed. Most probably `localhost`|\n|USER| Username of the postgreSQL User (default: `postgres`)|\n|PASSWORD|Password to the PostgreSQL User. You might have to set this via `\\password username` command of PostgreSQL Shell|\n|DB| The DB Name of the empty DB you created in the second step of Pre-requisites|\n\n## Let's Go\nYou are now ready to start the API Server. Run the following command from the root of the repository:\n\n```bash\nnpm start\n```\n\n## Demo\nHere is a test run with output:\n\u003e Remember to set `Content-Type` to `application/json` for requests with body\n\n### Test Route\n\n#### Request\n\n```bash\ncurl --location --request GET 'http://localhost:8080/'\n```\n#### Response\n\n```json\n{\n    \"message\": \"Welcome to Login System\",\n    \"developer\": {\n        \"name\": \"Muhammad Tayyab Sheikh\",\n        \"alias\": \"cstayyab\"\n    }\n}\n```\n\n### Signup\n\n#### Request\n```bash\ncurl --location --request POST 'http://localhost:8080/user/signup' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"username\": \"cstayyab\",\n    \"email\": \"cstayyab@gmail.com\",\n    \"password\": \"Test@1\"\n}'\n```\n\n#### Response \n```json\n{\n    \"message\": \"Signup Successful!\"\n}\n```\n\n### Login\n\n#### Request\n```bash\ncurl --location --request POST 'http://localhost:8080/user/login' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"username\": \"cstayyab\",\n    \"password\": \"Test@1\"\n}'\n```\n\n#### Response\n```json\n{\n    \"message\": \"Login Successful\",\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNzdGF5eWFiIiwiZW1haWwiOiJjc3RheXlhYkBnbWFpbC5jb20iLCJpYXQiOjE2MTk0MDcwMTl9.AdPWIFeT0W89lUO85e9jyqJRqxV9ac7mJ4sdqmvPWQA\"\n}\n```\n\n### Change Password\n\u003e This route is for when user is already logged in and want to update their password.\n\n#### Request\n```bash\ncurl --location --request POST 'http://localhost:8080/user/changepassword' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNzdGF5eWFiIiwiZW1haWwiOiJjc3RheXlhYkBnbWFpbC5jb20iLCJpYXQiOjE2MTk0MDcwMTl9.AdPWIFeT0W89lUO85e9jyqJRqxV9ac7mJ4sdqmvPWQA' \\\n--data-raw '{\n    \"oldpassword\": \"Test@1\",\n    \"newpassword\": \"Test@2\"\n}'\n```\n\n#### Response\n```json\n{\n    \"message\": \"Password Updated Successfully!\"\n}\n```\n\n### Password Verification\n\u003eThis route is for when user is logged in but want to change some sensitive information such as Email Address so we require re-authentication\n\n#### Request\n```bash\ncurl --location --request POST 'http://localhost:8080/user/verifypassword' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImNzdGF5eWFiIiwiZW1haWwiOiJjc3RheXlhYkBnbWFpbC5jb20iLCJpYXQiOjE2MTk0MDcwMTl9.AdPWIFeT0W89lUO85e9jyqJRqxV9ac7mJ4sdqmvPWQA' \\\n--data-raw '{\n    \"password\": \"Test@2\"\n}'\n```\n#### Response\n\n```json\n{\n    \"message\": \"Password Verification Successful!\"\n}\n```\n\n## Tested On\n|Tool|Version String|\n|:--|-------|\n|NPM|6.14.12|\n|Node|v14.16.1|\n|PostgreSQL|psql (PostgreSQL) 12.6 (Ubuntu 12.6-0ubuntu0.20.04.1)|\n\n## License\n### MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturesea-dev%2Fexpress-movie-ticket-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuturesea-dev%2Fexpress-movie-ticket-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuturesea-dev%2Fexpress-movie-ticket-api/lists"}