-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplates.json
More file actions
138 lines (138 loc) · 9.52 KB
/
templates.json
File metadata and controls
138 lines (138 loc) · 9.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
"express-mongodb-api": {
"contents": [
{
"name": "server.js",
"type": "file"
},
{
"name": "package.json",
"type": "file",
"contents": "{\n \"name\": \"express-mongo-rest-api\",\n \"version\": \"1.0.0\",\n \"description\": \"Example express/MongoDB API\",\n \"main\": \"server.js\",\n \"scripts\": {\n \"test\": \"./node_modules/mocha/bin/mocha test\"\n },\n \"keywords\": [\n \"express\",\n \"mongodb\",\n \"resful-api\"\n ],\n \"author\": \"FirstName LastName <email@domain.com>\",\n \"license\": \"ISC\",\n \"dependencies\": {\n \"body-parser\": \"^1.19.0\",\n \"express\": \"^4.17.1\",\n \"hot-shots\": \"^6.3.0\",\n \"mongo-sanitize\": \"^1.0.1\",\n \"mongoose\": \"^5.5.11\",\n \"winston\": \"^3.2.1\",\n \"winston-datadog\": \"^1.1.0\"\n },\n \"devDependencies\": {\n \"mocha\": \"^6.1.4\",\n \"nodemon\": \"^1.19.1\"\n }\n}"
},
{
"name": ".gitignore",
"type": "file",
"contents": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# next.js build output\n.next\n\n# nuxt.js build output\n.nuxt\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/"
},
{
"name": "README.md",
"type": "file",
"contents": "***Dependencies Used***\n- [express](https://npmjs.com/package/express) *(server)*\n- [body-parser](https://npmjs.com/package/) *(express middleware)* --> parses request and return body if request is a POST request\n- [mongoose](https://npmjs.com/package/mongoose) *(ORM)* --> interacts with MongoDB (e.g. schema creation, CRUD operations)\n- [mongo-sanitize](https://npmjs.com/package/mongo-sanitize) --> sanitizes inputs and protect against NoSQL injection\n- [hot-shots](https://npmjs.com/package/hot-shots) *(analytics)* --> sends analytics data (e.g. API response time) to service like Datadog\n- [winston](https://npmjs.com/package/winston) *(logging)* --> logger for API events\n- [winston-datadog](https://npmjs.com/package/winston-datadog) *(logging/analytics)* --> sends winston-logged events to Datadog\n\n***File Structure***\n\n**controllers/** -- folder used for the controllers of the routes\n *example.controller.js* -- the controller for the route '/example'\n\n**models/**\n *example.models.js* -- the database models used for the route '/example'\n\n**routes/** -- folder used to define what happens at certain routes\n *example.route.js* -- file used to define what happens at route '/example'\n\n**test/** -- folder used to store test files for all tests\n **[any folder (e.g. 'controllers')]**\n *[files in folder, suffixed with '.test.js' (e.g. 'example.controller.text.js')]*\n\n*server.js* -- main file, used to start up server and bind to port\n*package.json* -- contains all dependencies and general project info"
},
{
"name": "controllers",
"type": "folder",
"contents": [
{
"name": "example.controller.js",
"type": "file"
}
]
},
{
"name": "db",
"type": "folder",
"contents": [
{
"name": "example.db.js",
"type": "file"
}
]
},
{
"name": "routes",
"type": "folder",
"contents": [
{
"name": "example.route.js",
"type": "file"
}
]
},
{
"name": "test",
"type": "folder",
"contents": [
{
"name": "controllers",
"type": "folder",
"contents": [
{
"name": "example.controller.js",
"type": "file"
}
]
}
]
}
],
"created_at": "2019-06-04T15:33:16.297Z",
"lang": "nodejs"
},
"flask-app": {
"lang": "python",
"contents": [
{
"name": "README.md",
"type": "file",
"contents": "***File Structure***\n\n*run.py* -- This is the file that is invoked to start up a development server. It gets a copy of the app from your package and runs it. This won’t be used in production, but it will see a lot of mileage in development.\n*requirements.txt* -- This file lists all of the Python packages that your app depends on. You may have separate files for production and development dependencies.\n*config.py* -- This file contains most of the configuration variables that your app needs.\n\n**instance/** -- This folder is used to store sensitive information that shouldn't be shown directly.\n *config.py* -- This file contains configuration variables that shouldn’t be in version control. This includes things like API keys and database URIs containing passwords. This also contains variables that are specific to this particular instance of your application. For example, you might have `DEBUG = False` in `config.py`, but set `DEBUG = True` in instance/config.py on your local machine for development. Since this file will be read in after config.py, it will override it and set `DEBUG = True`.\n\n**yourapp/** -- This is the package that contains your application.\n *\\_\\_init\\_\\_.py* -- This file initializes your application and brings together all of the various components.\n *views.py* -- This is where the routes are defined. It may be split into a package of its own (yourapp/views/) with related views grouped together into modules.\n *models.py* -- This is where you define the models of your application. This may be split into several modules in the same way as views.py.\n *forms.py* -- This is where you will put all of your code related to forms (e.g. your code for handling form responses will go here).\n **static/** -- This directory contains the public CSS, JavaScript, images and other files that you want to make public via your app. It is accessible from yourapp.com/static/ by default.\n **templates/** -- This is where you’ll put the Jinja2 templates for your app.\n\n**This information is sourced from [exploreflask.com](http://exploreflask.com/en/latest/organizing.html).**"
},
{
"name": "config.py",
"type": "file"
},
{
"name": "instance",
"type": "folder",
"contents": [
{
"name": "config.py",
"type": "file"
}
]
},
{
"name": "requirements.txt",
"type": "file"
},
{
"name": "run.py",
"type": "file"
},
{
"name": "yourapp",
"type": "folder",
"contents": [
{
"name": "__init__.py",
"type": "file"
},
{
"name": "forms.py",
"type": "file"
},
{
"name": "models.py",
"type": "file"
},
{
"name": "static",
"type": "folder",
"contents": []
},
{
"name": "templates",
"type": "folder",
"contents": []
},
{
"name": "views.py",
"type": "file"
}
]
}
],
"created_at": "2019-06-04T18:59:43.137Z"
}
}