Skip to content

Instantly share code, notes, and snippets.

@jardix22
Last active August 29, 2015 14:05
Show Gist options
  • Save jardix22/e3f949e602129ecd0a86 to your computer and use it in GitHub Desktop.
Save jardix22/e3f949e602129ecd0a86 to your computer and use it in GitHub Desktop.
-------- Project X
<!-- load cdn de execution -->
<script src="http://el-tracker.com/cdn/projectId"></script>
------- project.router.js
>> path: /cdn/:projectId
- get param projectId
- verify if exist project?
-- [yes]
--- verify if exist cdn-project-id.js file?
---- [No]
----- read cdn-execution base file
----- create a new cdn-project-id.js file
----- copy data of cdn-execution base file and put this into the cdn-project-id.js
----- search {{projectId}} patern and change by project-id into the cdn-project-id.js file
----- (this to get only project-id rules)
--
-- response with the cdn-project-id.js file. (i need to use res.sendfile() method)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment