{"id":20433531,"url":"https://github.com/wasilak/query-params-parser","last_synced_at":"2025-05-08T17:33:18.207Z","repository":{"id":34005370,"uuid":"37760690","full_name":"wasilak/Query-Params-Parser","owner":"wasilak","description":"MEAN stack app for parsing URL query params","archived":true,"fork":false,"pushed_at":"2024-09-30T12:04:54.000Z","size":8798,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T06:23:23.587Z","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":"spockframework/spock","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasilak.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}},"created_at":"2015-06-20T06:41:59.000Z","updated_at":"2024-10-01T15:13:58.000Z","dependencies_parsed_at":"2022-07-13T21:43:14.754Z","dependency_job_id":null,"html_url":"https://github.com/wasilak/Query-Params-Parser","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/wasilak%2FQuery-Params-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilak%2FQuery-Params-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilak%2FQuery-Params-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasilak%2FQuery-Params-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasilak","download_url":"https://codeload.github.com/wasilak/Query-Params-Parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253114819,"owners_count":21856570,"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-15T08:19:37.900Z","updated_at":"2025-05-08T17:33:17.892Z","avatar_url":"https://github.com/wasilak.png","language":"JavaScript","readme":"# Query Params Parser\nMEAN stack app for parsing URL query params\n\n[![Code Climate](https://codeclimate.com/github/wasilak/Query-Params-Parser/badges/gpa.svg)](https://codeclimate.com/github/wasilak/Query-Params-Parser)\n![](https://img.shields.io/badge/IE-not%20supported-red.svg)\n![](http://i.imgur.com/3FGaMtj.png)\n\nI created this application because I needed a simple way to analyze URLs and modify them, ie Their query params or hash (#) and generate new ready-to-use URL.\n\nI chose **MEAN** stack (**M**ongo **E**xpress **A**ngularJS **N**ode.js, not to mistake for http://mean.io/) because I believe that this set of technologies is already standard for modern web development, not to mention it's speed, ease of use, testability and the fact, that I really wanted to work with them :)\n\nI started to write tests using https://karma-runner.github.io/ and http://jasmine.github.io/ but for now, they are basicaly only configured. It is a side project and my time is limited, unfortunatly... :/\n\n\u003e #### Small disclaimer\n\u003e This app is meant to be run on Heroku, but you should have no problem with running it anywhere else. See appropriate notes in installation process description.\n\nWhat you will need (to do) in order to install and run this application:\n\n1. `node.js` with `npm`\n2. install dependencies (`Express`, `Mongoose`, `hashids`, etc.):\n\n    Go to app source code:\n    ```bash\n    cd /path/to/where/you/cloned/repo\n    ````\n\n    fire up packages install for development (it will install `devDependencies` )\n    ````bash\n    npm install\n    ````\n\n    but if you don't want dev packages, i.e. for production environment, use:\n    ````bash\n    npm install --production\n    ```\n\n    or or set the `NODE_ENV` environment variable to `production`:\n    ```bash\n    export NODE_ENV=production\n    ```\n\n    \u003e `NPM` will install `bower.js` and it will in turn install all frontend JS and CSS dependencies app needs using `postinstall` hook in `scripts`.\n3. You need to tell app how to connect to MongoDB by setting enviroment variable named `QPP_MONGO_URI`.\n\n  \u003e Heroku will do this for you, if you use i.e. MongoLab addon, but all they can provide is `MONGOLAB_URI` env variable. What you need to do is copy it's conents into new env variable named `QPP_MONGO_URI`.\n\n  Locally you can just export this variable before runnning an app with something like this:\n\n  ```bash\n  export QPP_MONGO_URI=mongodb://username:password@host/collection\n  ```\n\n  or export and run in one line:\n\n  ```bash\n  export QPP_MONGO_URI=mongodb://username:password@host/collection \u0026\u0026 node app.js\n  ```\n4. Second required ENV variable is `QPP_HASH_SALT`, which sets unique salt for URL hashes. In order to make things more safe it has to be different for every application and as random as you can think of :)\n  ```\n  export QPP_HASH_SALT=fiufgnc9oq23rmxq89rypq380fu,xq\n  ```\n4. By default app will run on port `5000`, but you can override this by setting `QPP_PORT` env variable.\n  \u003e Again, Heroku will do this for you, but keep in mind that `QPP_PORT` takes precenedce over `PORT`, which Heroku uses, so in that case you might want to omit it and stick with `PORT` provided by Heroku.\n\n  ```bash\n  export QPP_PORT=5000\n  ```\n5. Now run application using:\n  * `node`:\n  ```bash\n  node app.js\n  ```\n  * Foreman (see below why it is a better way of doing this):\n  ```\n  foreman start\n  ```\n\n5. List of options set via ENV variables - see example `.env` file below, in **Foreman** section.\n5. That's it, app should be working now. You should be able to access it by opening (using default port) `http://localhost:5000` in your web browser.\n6. Tests are not there yet, but you can run them by installing `dev` packages and:\n\n  Go into `tests` dir and run `karma` runner:\n\n  ```bash\n  cd  public/app/tests\n  karma start\n  ```\n\n## Running app with Foreman\nIt is encoureged to run this app with [Foreman](https://github.com/ddollar/foreman) for at least two reasons:\n* It reads automatically `.env` file placed in app root and gets all enviroment variables from there, so you don't have to use `export` syntax\n* Heroku uses it, so it makes things more consistent among environments\n\n\u003e `Procfile` for foreman is already provided in repo\n\nIf you don't already have it, install it with: `gem install foreman`.\n\nExample `.env` file (ignored by Git in this repo) with **application defaults**:\n\n```bash\nQPP_HASH_SALT=fiufgnc9oq23rmxq89rypq380fu,xq\nQPP_MONGO_URI=mongodb://username:password@host/collection\nQPP_PORT=5000\nQPP_HASH_LENGTH=12\n```\n\n## TODOs\n- [x] deployment to Heroku\n- [x] using foreman\n- [ ] tests, tests, tests!\n- [ ] some kind of scheduler to clean URLs from DB after fixed period of time (expiration)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasilak%2Fquery-params-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasilak%2Fquery-params-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasilak%2Fquery-params-parser/lists"}