{"id":19485627,"url":"https://github.com/pyozer/myexpress","last_synced_at":"2026-06-16T15:31:29.749Z","repository":{"id":66215421,"uuid":"214383092","full_name":"Pyozer/myExpress","owner":"Pyozer","description":null,"archived":false,"fork":false,"pushed_at":"2019-10-22T20:53:26.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T01:10:13.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Pyozer.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":"2019-10-11T08:24:22.000Z","updated_at":"2019-10-22T20:53:28.000Z","dependencies_parsed_at":"2023-02-25T02:15:20.886Z","dependency_job_id":null,"html_url":"https://github.com/Pyozer/myExpress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pyozer/myExpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2FmyExpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2FmyExpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2FmyExpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2FmyExpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pyozer","download_url":"https://codeload.github.com/Pyozer/myExpress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyozer%2FmyExpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34412785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":"2024-11-10T20:29:05.464Z","updated_at":"2026-06-16T15:31:29.730Z","avatar_url":"https://github.com/Pyozer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/makiboto/myExpress/master/assets/myExpress.png\" /\u003e\n\u003c/p\u003e\n\n## \u003ca name='TOC'\u003e🐼 Summary\u003c/a\u003e\n\n- [Rules](#rules)\n- [Overview](#overview)\n- [Story](#story)\n- [Credits](#credits)\n\n## \u003ca name='overview'\u003e🦊 Rules\u003c/a\u003e\n\nHi, here are some rules to carry out this story oav;\n\n- You **MUST** create a git repository named `myExpress`\n- You **MUST** create a file called `.author.json` with your username followed by a newline:\n\n```sh\n~/codeflix/onecode/myExpress ❯❯❯ cat -e .author.json\n{\n  \"username\": \"ch0pper\"\n}$\n```\n\n\u003e Of course, you can talk about the subject with other developers, peer-learning is\n\u003e the key to be a better developer. Don't hesitate to ask questions or help people in\n\u003e the channel **izi-learning-network**\n\n\u003e Don't forget, there is no useless question :-)\n\n## \u003ca name='overview'\u003e🐱 Overview\u003c/a\u003e\n\nThe purpose of this challenge is to (re)create a HTTP client server.\nYou **HAVE TO** use TypeScript and the **http** node package\n\n## \u003ca name='story'\u003e🐨 Story\u003c/a\u003e\n\n#### From express to myExpress\n\nThe `express()` function is a top-level function exported by the express module.\n\n```js\nconst express = require('./my-express')\nconst app = express()\n```\n\nYou **HAVE TO** browse the real [express API](https://expressjs.com)\n\n##### Basics\n\nYou **HAVE TO** and handle the following properties:\n\n- `app.get()`\n- `app.post()`\n- `app.put()`\n- `app.delete()`\n- `app.all()`\n- `app.listen()`\n\nExemple:\n\n```js\napp.get('/api', (req, res) =\u003e {\n  res.json({ hello: 'From API' })\n})\n```\n\n#### Rendering\n\nYou **HAVE TO** add a render method that follow express rules:\n\n```js\napp.render('home', (err, html) =\u003e {\n  // ...\n})\n\napp.render('home', { name: 'Ch0pper' }, (err, html) =\u003e {\n  res.send(html)\n})\n```\n\nThe first parameters **HAVE TO** found an `html.mustache` file on a directory called pages.\n\nWhat is **mustache** ? Well, it's your new handmade template engine, #braaaaaah :-)\nWhen the second parameter is an object, you **MUST** replace all mustache template keys by their values ;\n\nExemple :\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eEfrei\u003c/title\u003e\n    \u003cmeta\n      name=\"description\"\n      content=\"This is an example of a meta description.\"\n    /\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"main.css\" /\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eHello {{name}}\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nWell, you will replace **name** by **Chopper**.\n\nA sexy template thing is to add through a pipe (|) what we called a **modifier**.\nYou have to handle the following modifier:\n\n- `upper`\n- `lower`\n- `fixed:n`\n\nFor the fixed example, you **HAVE TO** handle args separate by **:**.\n\nExemple:\n\n```js\napp.render('home', { name: 'Ch0pper', weight: 33.1337 }, (err, html) =\u003e {\n  // ...\n})\n```\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eEfrei\u003c/title\u003e\n    \u003cmeta\n      name=\"description\"\n      content=\"This is an example of a meta description.\"\n    /\u003e\n    \u003clink rel=\"stylesheet\" type=\"text/css\" href=\"main.css\" /\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003eHello {{name | upper}}, my weight is {{weight | fixed:2 }}\u003c/h1\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003e Weight displayed will be **33.13**\n\n#### Advanced\n\n##### Middleware\n\nNow you **HAVE TO** handle the `app.use` method for middleware.\nThis method take a callback with the following signature:\n\n```js\nfunction (req, res, next) {\n  console.log('Time: %d', Date.now())\n  next()\n}\n```\n\n\u003e What is next ? ;)\n\n##### Query parameters and args\n\nWell, an API is better if we can handle all parameters send by the client.\nYou **HAVE TO** handle all of them ;D\n\n```js\napp.get('/user/:id', (req, res) =\u003e {\n  const { id } = req.params\n  console.log(`The user id is ${id}`)\n  // ...\n})\n\napp.get('/users?limit=42\u0026status=ADMIN', (req, res) =\u003e {\n  const { limit, status } = req.qParams\n  console.log(`The limitation is ${limit} for ${status} users`)\n  // ...\n})\n```\n\n## \u003ca name='bonus'\u003e🦄 Bonus\u003c/a\u003e\n\nIn bulk:\n\n- Add mustache features like if/else, for-loop, etc.x1x\n- Add more express to myExpress features\n\n## \u003ca name='credits'\u003e🐵 Credits\u003c/a\u003e\n\nCraft with :heart: in **Paris**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyozer%2Fmyexpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyozer%2Fmyexpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyozer%2Fmyexpress/lists"}