├── .gitignore
├── Books
├── app
│ ├── model.js
│ └── routes.js
├── package-lock.json
├── package.json
├── public
│ ├── index.html
│ └── script.js
└── server.js
├── LICENSE
├── LICENSE-CODE
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 |
--------------------------------------------------------------------------------
/Books/app/model.js:
--------------------------------------------------------------------------------
1 | var mongoose = require('mongoose');
2 | var dbHost = 'mongodb://localhost:27017/Books';
3 | mongoose.connect(dbHost, { useNewUrlParser: true } );
4 | mongoose.connection;
5 | mongoose.set('debug', true);
6 | var bookSchema = mongoose.Schema( {
7 | name: String,
8 | isbn: {type: String, index: true},
9 | author: String,
10 | pages: Number
11 | });
12 | var Book = mongoose.model('Book', bookSchema);
13 | module.exports = Book;
--------------------------------------------------------------------------------
/Books/app/routes.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var Book = require('./model');
3 | var routes = function(app) {
4 | app.get('/book', function(req, res) {
5 | Book.find({}, function(err, result) {
6 | if ( err ) throw err;
7 | res.json(result);
8 | });
9 | });
10 | app.post('/book', function(req, res) {
11 | var book = new Book( {
12 | name:req.body.name,
13 | isbn:req.body.isbn,
14 | author:req.body.author,
15 | pages:req.body.pages
16 | });
17 | book.save(function(err, result) {
18 | if ( err ) throw err;
19 | res.json( {
20 | message:"Successfully added book",
21 | book:result
22 | });
23 | });
24 | });
25 | app.delete("/book/:isbn", function(req, res) {
26 | Book.findOneAndRemove(req.query, function(err, result) {
27 | if ( err ) throw err;
28 | res.json( {
29 | message: "Successfully deleted the book",
30 | book: result
31 | });
32 | });
33 | });
34 | app.get('*', function(req, res) {
35 | res.sendFile(path.join(__dirname + '/public', 'index.html'));
36 | });
37 | };
38 | module.exports = routes;
--------------------------------------------------------------------------------
/Books/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "books",
3 | "requires": true,
4 | "lockfileVersion": 1,
5 | "dependencies": {
6 | "accepts": {
7 | "version": "1.3.5",
8 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
9 | "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
10 | "requires": {
11 | "mime-types": "~2.1.18",
12 | "negotiator": "0.6.1"
13 | }
14 | },
15 | "array-flatten": {
16 | "version": "1.1.1",
17 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
18 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
19 | },
20 | "async": {
21 | "version": "2.6.1",
22 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
23 | "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
24 | "requires": {
25 | "lodash": "^4.17.10"
26 | }
27 | },
28 | "bluebird": {
29 | "version": "3.5.1",
30 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
31 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
32 | },
33 | "body-parser": {
34 | "version": "1.18.3",
35 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
36 | "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
37 | "requires": {
38 | "bytes": "3.0.0",
39 | "content-type": "~1.0.4",
40 | "debug": "2.6.9",
41 | "depd": "~1.1.2",
42 | "http-errors": "~1.6.3",
43 | "iconv-lite": "0.4.23",
44 | "on-finished": "~2.3.0",
45 | "qs": "6.5.2",
46 | "raw-body": "2.3.3",
47 | "type-is": "~1.6.16"
48 | }
49 | },
50 | "bson": {
51 | "version": "1.1.0",
52 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz",
53 | "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA=="
54 | },
55 | "bytes": {
56 | "version": "3.0.0",
57 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
58 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
59 | },
60 | "content-disposition": {
61 | "version": "0.5.2",
62 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
63 | "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
64 | },
65 | "content-type": {
66 | "version": "1.0.4",
67 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
68 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
69 | },
70 | "cookie": {
71 | "version": "0.3.1",
72 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
73 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
74 | },
75 | "cookie-signature": {
76 | "version": "1.0.6",
77 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
78 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
79 | },
80 | "debug": {
81 | "version": "2.6.9",
82 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
83 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
84 | "requires": {
85 | "ms": "2.0.0"
86 | }
87 | },
88 | "depd": {
89 | "version": "1.1.2",
90 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
91 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
92 | },
93 | "destroy": {
94 | "version": "1.0.4",
95 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
96 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
97 | },
98 | "ee-first": {
99 | "version": "1.1.1",
100 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
101 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
102 | },
103 | "encodeurl": {
104 | "version": "1.0.2",
105 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
106 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
107 | },
108 | "escape-html": {
109 | "version": "1.0.3",
110 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
111 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
112 | },
113 | "etag": {
114 | "version": "1.8.1",
115 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
116 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
117 | },
118 | "express": {
119 | "version": "4.16.4",
120 | "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
121 | "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
122 | "requires": {
123 | "accepts": "~1.3.5",
124 | "array-flatten": "1.1.1",
125 | "body-parser": "1.18.3",
126 | "content-disposition": "0.5.2",
127 | "content-type": "~1.0.4",
128 | "cookie": "0.3.1",
129 | "cookie-signature": "1.0.6",
130 | "debug": "2.6.9",
131 | "depd": "~1.1.2",
132 | "encodeurl": "~1.0.2",
133 | "escape-html": "~1.0.3",
134 | "etag": "~1.8.1",
135 | "finalhandler": "1.1.1",
136 | "fresh": "0.5.2",
137 | "merge-descriptors": "1.0.1",
138 | "methods": "~1.1.2",
139 | "on-finished": "~2.3.0",
140 | "parseurl": "~1.3.2",
141 | "path-to-regexp": "0.1.7",
142 | "proxy-addr": "~2.0.4",
143 | "qs": "6.5.2",
144 | "range-parser": "~1.2.0",
145 | "safe-buffer": "5.1.2",
146 | "send": "0.16.2",
147 | "serve-static": "1.13.2",
148 | "setprototypeof": "1.1.0",
149 | "statuses": "~1.4.0",
150 | "type-is": "~1.6.16",
151 | "utils-merge": "1.0.1",
152 | "vary": "~1.1.2"
153 | },
154 | "dependencies": {
155 | "statuses": {
156 | "version": "1.4.0",
157 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
158 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
159 | }
160 | }
161 | },
162 | "finalhandler": {
163 | "version": "1.1.1",
164 | "resolved": "http://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
165 | "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
166 | "requires": {
167 | "debug": "2.6.9",
168 | "encodeurl": "~1.0.2",
169 | "escape-html": "~1.0.3",
170 | "on-finished": "~2.3.0",
171 | "parseurl": "~1.3.2",
172 | "statuses": "~1.4.0",
173 | "unpipe": "~1.0.0"
174 | },
175 | "dependencies": {
176 | "statuses": {
177 | "version": "1.4.0",
178 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
179 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
180 | }
181 | }
182 | },
183 | "forwarded": {
184 | "version": "0.1.2",
185 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
186 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
187 | },
188 | "fresh": {
189 | "version": "0.5.2",
190 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
191 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
192 | },
193 | "http-errors": {
194 | "version": "1.6.3",
195 | "resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
196 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
197 | "requires": {
198 | "depd": "~1.1.2",
199 | "inherits": "2.0.3",
200 | "setprototypeof": "1.1.0",
201 | "statuses": ">= 1.4.0 < 2"
202 | }
203 | },
204 | "iconv-lite": {
205 | "version": "0.4.23",
206 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
207 | "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
208 | "requires": {
209 | "safer-buffer": ">= 2.1.2 < 3"
210 | }
211 | },
212 | "inherits": {
213 | "version": "2.0.3",
214 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
215 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
216 | },
217 | "ipaddr.js": {
218 | "version": "1.8.0",
219 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
220 | "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
221 | },
222 | "kareem": {
223 | "version": "2.3.0",
224 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
225 | "integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
226 | },
227 | "lodash": {
228 | "version": "4.17.15",
229 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
230 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
231 | },
232 | "lodash.get": {
233 | "version": "4.4.2",
234 | "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
235 | "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
236 | },
237 | "media-typer": {
238 | "version": "0.3.0",
239 | "resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
240 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
241 | },
242 | "memory-pager": {
243 | "version": "1.1.0",
244 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.1.0.tgz",
245 | "integrity": "sha512-Mf9OHV/Y7h6YWDxTzX/b4ZZ4oh9NSXblQL8dtPCOomOtZciEHxePR78+uHFLLlsk01A6jVHhHsQZZ/WcIPpnzg==",
246 | "optional": true
247 | },
248 | "merge-descriptors": {
249 | "version": "1.0.1",
250 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
251 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
252 | },
253 | "methods": {
254 | "version": "1.1.2",
255 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
256 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
257 | },
258 | "mime": {
259 | "version": "1.4.1",
260 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
261 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
262 | },
263 | "mime-db": {
264 | "version": "1.37.0",
265 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
266 | "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
267 | },
268 | "mime-types": {
269 | "version": "2.1.21",
270 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
271 | "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
272 | "requires": {
273 | "mime-db": "~1.37.0"
274 | }
275 | },
276 | "mongodb": {
277 | "version": "3.1.8",
278 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.8.tgz",
279 | "integrity": "sha512-yNKwYxQ6m00NV6+pMoWoheFTHSQVv1KkSrfOhRDYMILGWDYtUtQRqHrFqU75rmPIY8hMozVft8zdC4KYMWaM3Q==",
280 | "requires": {
281 | "mongodb-core": "3.1.7",
282 | "safe-buffer": "^5.1.2"
283 | }
284 | },
285 | "mongodb-core": {
286 | "version": "3.1.7",
287 | "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.7.tgz",
288 | "integrity": "sha512-YffpSrLmgFNmrvkGx+yX00KyBNk64C0BalfEn6vHHkXtcMUGXw8nxrMmhq5eXPLLlYeBpD/CsgNxE2Chf0o4zQ==",
289 | "requires": {
290 | "bson": "^1.1.0",
291 | "require_optional": "^1.0.1",
292 | "safe-buffer": "^5.1.2",
293 | "saslprep": "^1.0.0"
294 | }
295 | },
296 | "mongoose": {
297 | "version": "5.3.9",
298 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.3.9.tgz",
299 | "integrity": "sha512-FbCW2qCptfPW/ltRwgqKpPCK113WTIhZDnn+0L0hO2XoX9Yp4LuIP0Nab7eBK+TsiIXWZAvzKhnnUKElTbl5ow==",
300 | "requires": {
301 | "async": "2.6.1",
302 | "bson": "~1.1.0",
303 | "kareem": "2.3.0",
304 | "lodash.get": "4.4.2",
305 | "mongodb": "3.1.8",
306 | "mongodb-core": "3.1.7",
307 | "mongoose-legacy-pluralize": "1.0.2",
308 | "mpath": "0.5.1",
309 | "mquery": "3.2.0",
310 | "ms": "2.0.0",
311 | "regexp-clone": "0.0.1",
312 | "safe-buffer": "5.1.2",
313 | "sliced": "1.0.1"
314 | }
315 | },
316 | "mongoose-legacy-pluralize": {
317 | "version": "1.0.2",
318 | "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
319 | "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ=="
320 | },
321 | "mpath": {
322 | "version": "0.5.1",
323 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz",
324 | "integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg=="
325 | },
326 | "mquery": {
327 | "version": "3.2.0",
328 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz",
329 | "integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==",
330 | "requires": {
331 | "bluebird": "3.5.1",
332 | "debug": "3.1.0",
333 | "regexp-clone": "0.0.1",
334 | "safe-buffer": "5.1.2",
335 | "sliced": "1.0.1"
336 | },
337 | "dependencies": {
338 | "debug": {
339 | "version": "3.1.0",
340 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
341 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
342 | "requires": {
343 | "ms": "2.0.0"
344 | }
345 | }
346 | }
347 | },
348 | "ms": {
349 | "version": "2.0.0",
350 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
351 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
352 | },
353 | "negotiator": {
354 | "version": "0.6.1",
355 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
356 | "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
357 | },
358 | "on-finished": {
359 | "version": "2.3.0",
360 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
361 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
362 | "requires": {
363 | "ee-first": "1.1.1"
364 | }
365 | },
366 | "parseurl": {
367 | "version": "1.3.2",
368 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
369 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
370 | },
371 | "path-to-regexp": {
372 | "version": "0.1.7",
373 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
374 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
375 | },
376 | "proxy-addr": {
377 | "version": "2.0.4",
378 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
379 | "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==",
380 | "requires": {
381 | "forwarded": "~0.1.2",
382 | "ipaddr.js": "1.8.0"
383 | }
384 | },
385 | "qs": {
386 | "version": "6.5.2",
387 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
388 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
389 | },
390 | "range-parser": {
391 | "version": "1.2.0",
392 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
393 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
394 | },
395 | "raw-body": {
396 | "version": "2.3.3",
397 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
398 | "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
399 | "requires": {
400 | "bytes": "3.0.0",
401 | "http-errors": "1.6.3",
402 | "iconv-lite": "0.4.23",
403 | "unpipe": "1.0.0"
404 | }
405 | },
406 | "regexp-clone": {
407 | "version": "0.0.1",
408 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz",
409 | "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk="
410 | },
411 | "require_optional": {
412 | "version": "1.0.1",
413 | "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
414 | "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
415 | "requires": {
416 | "resolve-from": "^2.0.0",
417 | "semver": "^5.1.0"
418 | }
419 | },
420 | "resolve-from": {
421 | "version": "2.0.0",
422 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
423 | "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
424 | },
425 | "safe-buffer": {
426 | "version": "5.1.2",
427 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
428 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
429 | },
430 | "safer-buffer": {
431 | "version": "2.1.2",
432 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
433 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
434 | },
435 | "saslprep": {
436 | "version": "1.0.2",
437 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz",
438 | "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==",
439 | "optional": true,
440 | "requires": {
441 | "sparse-bitfield": "^3.0.3"
442 | }
443 | },
444 | "semver": {
445 | "version": "5.6.0",
446 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
447 | "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
448 | },
449 | "send": {
450 | "version": "0.16.2",
451 | "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
452 | "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
453 | "requires": {
454 | "debug": "2.6.9",
455 | "depd": "~1.1.2",
456 | "destroy": "~1.0.4",
457 | "encodeurl": "~1.0.2",
458 | "escape-html": "~1.0.3",
459 | "etag": "~1.8.1",
460 | "fresh": "0.5.2",
461 | "http-errors": "~1.6.2",
462 | "mime": "1.4.1",
463 | "ms": "2.0.0",
464 | "on-finished": "~2.3.0",
465 | "range-parser": "~1.2.0",
466 | "statuses": "~1.4.0"
467 | },
468 | "dependencies": {
469 | "statuses": {
470 | "version": "1.4.0",
471 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
472 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
473 | }
474 | }
475 | },
476 | "serve-static": {
477 | "version": "1.13.2",
478 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
479 | "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
480 | "requires": {
481 | "encodeurl": "~1.0.2",
482 | "escape-html": "~1.0.3",
483 | "parseurl": "~1.3.2",
484 | "send": "0.16.2"
485 | }
486 | },
487 | "setprototypeof": {
488 | "version": "1.1.0",
489 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
490 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
491 | },
492 | "sliced": {
493 | "version": "1.0.1",
494 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
495 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
496 | },
497 | "sparse-bitfield": {
498 | "version": "3.0.3",
499 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
500 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
501 | "optional": true,
502 | "requires": {
503 | "memory-pager": "^1.0.2"
504 | }
505 | },
506 | "statuses": {
507 | "version": "1.5.0",
508 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
509 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
510 | },
511 | "type-is": {
512 | "version": "1.6.16",
513 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
514 | "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
515 | "requires": {
516 | "media-typer": "0.3.0",
517 | "mime-types": "~2.1.18"
518 | }
519 | },
520 | "unpipe": {
521 | "version": "1.0.0",
522 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
523 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
524 | },
525 | "utils-merge": {
526 | "version": "1.0.1",
527 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
528 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
529 | },
530 | "vary": {
531 | "version": "1.1.2",
532 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
533 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
534 | }
535 | }
536 | }
537 |
--------------------------------------------------------------------------------
/Books/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "books",
3 | "description": "Sample web app that manages book information.",
4 | "license": "MIT",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/MicrosoftDocs/mslearn-build-a-web-app-with-mean-on-a-linux-vm"
8 | },
9 | "main": "server.js",
10 | "dependencies": {
11 | "express": "~4.16",
12 | "mongoose": "~5.3",
13 | "body-parser": "~1.18"
14 | }
15 | }
--------------------------------------------------------------------------------
/Books/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
29 |
30 |
47 |
48 |
--------------------------------------------------------------------------------
/Books/public/script.js:
--------------------------------------------------------------------------------
1 | var app = angular.module('myApp', []);
2 | app.controller('myCtrl', function($scope, $http) {
3 | var getData = function() {
4 | return $http( {
5 | method: 'GET',
6 | url: '/book'
7 | }).then(function successCallback(response) {
8 | $scope.books = response.data;
9 | }, function errorCallback(response) {
10 | console.log('Error: ' + response);
11 | });
12 | };
13 | getData();
14 | $scope.del_book = function(book) {
15 | $http( {
16 | method: 'DELETE',
17 | url: '/book/:isbn',
18 | params: {'isbn': book.isbn}
19 | }).then(function successCallback(response) {
20 | console.log(response);
21 | return getData();
22 | }, function errorCallback(response) {
23 | console.log('Error: ' + response);
24 | });
25 | };
26 | $scope.add_book = function() {
27 | var body = '{ "name": "' + $scope.Name +
28 | '", "isbn": "' + $scope.Isbn +
29 | '", "author": "' + $scope.Author +
30 | '", "pages": "' + $scope.Pages + '" }';
31 | $http({
32 | method: 'POST',
33 | url: '/book',
34 | data: body
35 | }).then(function successCallback(response) {
36 | console.log(response);
37 | return getData();
38 | }, function errorCallback(response) {
39 | console.log('Error: ' + response);
40 | });
41 | };
42 | });
--------------------------------------------------------------------------------
/Books/server.js:
--------------------------------------------------------------------------------
1 | var express = require('express');
2 | var bodyParser = require('body-parser');
3 | var app = express();
4 | app.use(express.static(__dirname + '/public'));
5 | app.use(bodyParser.json());
6 | require('./app/routes')(app);
7 | app.set('port', 80);
8 | app.listen(app.get('port'), function() {
9 | console.log('Server up: http://localhost:' + app.get('port'));
10 | });
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Attribution 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More_considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution 4.0 International Public License
58 |
59 | By exercising the Licensed Rights (defined below), You accept and agree
60 | to be bound by the terms and conditions of this Creative Commons
61 | Attribution 4.0 International Public License ("Public License"). To the
62 | extent this Public License may be interpreted as a contract, You are
63 | granted the Licensed Rights in consideration of Your acceptance of
64 | these terms and conditions, and the Licensor grants You such rights in
65 | consideration of benefits the Licensor receives from making the
66 | Licensed Material available under these terms and conditions.
67 |
68 |
69 | Section 1 -- Definitions.
70 |
71 | a. Adapted Material means material subject to Copyright and Similar
72 | Rights that is derived from or based upon the Licensed Material
73 | and in which the Licensed Material is translated, altered,
74 | arranged, transformed, or otherwise modified in a manner requiring
75 | permission under the Copyright and Similar Rights held by the
76 | Licensor. For purposes of this Public License, where the Licensed
77 | Material is a musical work, performance, or sound recording,
78 | Adapted Material is always produced where the Licensed Material is
79 | synched in timed relation with a moving image.
80 |
81 | b. Adapter's License means the license You apply to Your Copyright
82 | and Similar Rights in Your contributions to Adapted Material in
83 | accordance with the terms and conditions of this Public License.
84 |
85 | c. Copyright and Similar Rights means copyright and/or similar rights
86 | closely related to copyright including, without limitation,
87 | performance, broadcast, sound recording, and Sui Generis Database
88 | Rights, without regard to how the rights are labeled or
89 | categorized. For purposes of this Public License, the rights
90 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
91 | Rights.
92 |
93 | d. Effective Technological Measures means those measures that, in the
94 | absence of proper authority, may not be circumvented under laws
95 | fulfilling obligations under Article 11 of the WIPO Copyright
96 | Treaty adopted on December 20, 1996, and/or similar international
97 | agreements.
98 |
99 | e. Exceptions and Limitations means fair use, fair dealing, and/or
100 | any other exception or limitation to Copyright and Similar Rights
101 | that applies to Your use of the Licensed Material.
102 |
103 | f. Licensed Material means the artistic or literary work, database,
104 | or other material to which the Licensor applied this Public
105 | License.
106 |
107 | g. Licensed Rights means the rights granted to You subject to the
108 | terms and conditions of this Public License, which are limited to
109 | all Copyright and Similar Rights that apply to Your use of the
110 | Licensed Material and that the Licensor has authority to license.
111 |
112 | h. Licensor means the individual(s) or entity(ies) granting rights
113 | under this Public License.
114 |
115 | i. Share means to provide material to the public by any means or
116 | process that requires permission under the Licensed Rights, such
117 | as reproduction, public display, public performance, distribution,
118 | dissemination, communication, or importation, and to make material
119 | available to the public including in ways that members of the
120 | public may access the material from a place and at a time
121 | individually chosen by them.
122 |
123 | j. Sui Generis Database Rights means rights other than copyright
124 | resulting from Directive 96/9/EC of the European Parliament and of
125 | the Council of 11 March 1996 on the legal protection of databases,
126 | as amended and/or succeeded, as well as other essentially
127 | equivalent rights anywhere in the world.
128 |
129 | k. You means the individual or entity exercising the Licensed Rights
130 | under this Public License. Your has a corresponding meaning.
131 |
132 |
133 | Section 2 -- Scope.
134 |
135 | a. License grant.
136 |
137 | 1. Subject to the terms and conditions of this Public License,
138 | the Licensor hereby grants You a worldwide, royalty-free,
139 | non-sublicensable, non-exclusive, irrevocable license to
140 | exercise the Licensed Rights in the Licensed Material to:
141 |
142 | a. reproduce and Share the Licensed Material, in whole or
143 | in part; and
144 |
145 | b. produce, reproduce, and Share Adapted Material.
146 |
147 | 2. Exceptions and Limitations. For the avoidance of doubt, where
148 | Exceptions and Limitations apply to Your use, this Public
149 | License does not apply, and You do not need to comply with
150 | its terms and conditions.
151 |
152 | 3. Term. The term of this Public License is specified in Section
153 | 6(a).
154 |
155 | 4. Media and formats; technical modifications allowed. The
156 | Licensor authorizes You to exercise the Licensed Rights in
157 | all media and formats whether now known or hereafter created,
158 | and to make technical modifications necessary to do so. The
159 | Licensor waives and/or agrees not to assert any right or
160 | authority to forbid You from making technical modifications
161 | necessary to exercise the Licensed Rights, including
162 | technical modifications necessary to circumvent Effective
163 | Technological Measures. For purposes of this Public License,
164 | simply making modifications authorized by this Section 2(a)
165 | (4) never produces Adapted Material.
166 |
167 | 5. Downstream recipients.
168 |
169 | a. Offer from the Licensor -- Licensed Material. Every
170 | recipient of the Licensed Material automatically
171 | receives an offer from the Licensor to exercise the
172 | Licensed Rights under the terms and conditions of this
173 | Public License.
174 |
175 | b. No downstream restrictions. You may not offer or impose
176 | any additional or different terms or conditions on, or
177 | apply any Effective Technological Measures to, the
178 | Licensed Material if doing so restricts exercise of the
179 | Licensed Rights by any recipient of the Licensed
180 | Material.
181 |
182 | 6. No endorsement. Nothing in this Public License constitutes or
183 | may be construed as permission to assert or imply that You
184 | are, or that Your use of the Licensed Material is, connected
185 | with, or sponsored, endorsed, or granted official status by,
186 | the Licensor or others designated to receive attribution as
187 | provided in Section 3(a)(1)(A)(i).
188 |
189 | b. Other rights.
190 |
191 | 1. Moral rights, such as the right of integrity, are not
192 | licensed under this Public License, nor are publicity,
193 | privacy, and/or other similar personality rights; however, to
194 | the extent possible, the Licensor waives and/or agrees not to
195 | assert any such rights held by the Licensor to the limited
196 | extent necessary to allow You to exercise the Licensed
197 | Rights, but not otherwise.
198 |
199 | 2. Patent and trademark rights are not licensed under this
200 | Public License.
201 |
202 | 3. To the extent possible, the Licensor waives any right to
203 | collect royalties from You for the exercise of the Licensed
204 | Rights, whether directly or through a collecting society
205 | under any voluntary or waivable statutory or compulsory
206 | licensing scheme. In all other cases the Licensor expressly
207 | reserves any right to collect such royalties.
208 |
209 |
210 | Section 3 -- License Conditions.
211 |
212 | Your exercise of the Licensed Rights is expressly made subject to the
213 | following conditions.
214 |
215 | a. Attribution.
216 |
217 | 1. If You Share the Licensed Material (including in modified
218 | form), You must:
219 |
220 | a. retain the following if it is supplied by the Licensor
221 | with the Licensed Material:
222 |
223 | i. identification of the creator(s) of the Licensed
224 | Material and any others designated to receive
225 | attribution, in any reasonable manner requested by
226 | the Licensor (including by pseudonym if
227 | designated);
228 |
229 | ii. a copyright notice;
230 |
231 | iii. a notice that refers to this Public License;
232 |
233 | iv. a notice that refers to the disclaimer of
234 | warranties;
235 |
236 | v. a URI or hyperlink to the Licensed Material to the
237 | extent reasonably practicable;
238 |
239 | b. indicate if You modified the Licensed Material and
240 | retain an indication of any previous modifications; and
241 |
242 | c. indicate the Licensed Material is licensed under this
243 | Public License, and include the text of, or the URI or
244 | hyperlink to, this Public License.
245 |
246 | 2. You may satisfy the conditions in Section 3(a)(1) in any
247 | reasonable manner based on the medium, means, and context in
248 | which You Share the Licensed Material. For example, it may be
249 | reasonable to satisfy the conditions by providing a URI or
250 | hyperlink to a resource that includes the required
251 | information.
252 |
253 | 3. If requested by the Licensor, You must remove any of the
254 | information required by Section 3(a)(1)(A) to the extent
255 | reasonably practicable.
256 |
257 | 4. If You Share Adapted Material You produce, the Adapter's
258 | License You apply must not prevent recipients of the Adapted
259 | Material from complying with this Public License.
260 |
261 |
262 | Section 4 -- Sui Generis Database Rights.
263 |
264 | Where the Licensed Rights include Sui Generis Database Rights that
265 | apply to Your use of the Licensed Material:
266 |
267 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
268 | to extract, reuse, reproduce, and Share all or a substantial
269 | portion of the contents of the database;
270 |
271 | b. if You include all or a substantial portion of the database
272 | contents in a database in which You have Sui Generis Database
273 | Rights, then the database in which You have Sui Generis Database
274 | Rights (but not its individual contents) is Adapted Material; and
275 |
276 | c. You must comply with the conditions in Section 3(a) if You Share
277 | all or a substantial portion of the contents of the database.
278 |
279 | For the avoidance of doubt, this Section 4 supplements and does not
280 | replace Your obligations under this Public License where the Licensed
281 | Rights include other Copyright and Similar Rights.
282 |
283 |
284 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
285 |
286 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
287 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
288 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
289 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
290 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
291 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
292 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
293 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
294 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
295 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
296 |
297 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
298 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
299 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
300 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
301 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
302 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
303 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
304 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
305 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
306 |
307 | c. The disclaimer of warranties and limitation of liability provided
308 | above shall be interpreted in a manner that, to the extent
309 | possible, most closely approximates an absolute disclaimer and
310 | waiver of all liability.
311 |
312 |
313 | Section 6 -- Term and Termination.
314 |
315 | a. This Public License applies for the term of the Copyright and
316 | Similar Rights licensed here. However, if You fail to comply with
317 | this Public License, then Your rights under this Public License
318 | terminate automatically.
319 |
320 | b. Where Your right to use the Licensed Material has terminated under
321 | Section 6(a), it reinstates:
322 |
323 | 1. automatically as of the date the violation is cured, provided
324 | it is cured within 30 days of Your discovery of the
325 | violation; or
326 |
327 | 2. upon express reinstatement by the Licensor.
328 |
329 | For the avoidance of doubt, this Section 6(b) does not affect any
330 | right the Licensor may have to seek remedies for Your violations
331 | of this Public License.
332 |
333 | c. For the avoidance of doubt, the Licensor may also offer the
334 | Licensed Material under separate terms or conditions or stop
335 | distributing the Licensed Material at any time; however, doing so
336 | will not terminate this Public License.
337 |
338 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
339 | License.
340 |
341 |
342 | Section 7 -- Other Terms and Conditions.
343 |
344 | a. The Licensor shall not be bound by any additional or different
345 | terms or conditions communicated by You unless expressly agreed.
346 |
347 | b. Any arrangements, understandings, or agreements regarding the
348 | Licensed Material not stated herein are separate from and
349 | independent of the terms and conditions of this Public License.
350 |
351 |
352 | Section 8 -- Interpretation.
353 |
354 | a. For the avoidance of doubt, this Public License does not, and
355 | shall not be interpreted to, reduce, limit, restrict, or impose
356 | conditions on any use of the Licensed Material that could lawfully
357 | be made without permission under this Public License.
358 |
359 | b. To the extent possible, if any provision of this Public License is
360 | deemed unenforceable, it shall be automatically reformed to the
361 | minimum extent necessary to make it enforceable. If the provision
362 | cannot be reformed, it shall be severed from this Public License
363 | without affecting the enforceability of the remaining terms and
364 | conditions.
365 |
366 | c. No term or condition of this Public License will be waived and no
367 | failure to comply consented to unless expressly agreed to by the
368 | Licensor.
369 |
370 | d. Nothing in this Public License constitutes or may be interpreted
371 | as a limitation upon, or waiver of, any privileges and immunities
372 | that apply to the Licensor or You, including from the legal
373 | processes of any jurisdiction or authority.
374 |
375 |
376 | =======================================================================
377 |
378 | Creative Commons is not a party to its public
379 | licenses. Notwithstanding, Creative Commons may elect to apply one of
380 | its public licenses to material it publishes and in those instances
381 | will be considered the “Licensor.” The text of the Creative Commons
382 | public licenses is dedicated to the public domain under the CC0 Public
383 | Domain Dedication. Except for the limited purpose of indicating that
384 | material is shared under a Creative Commons public license or as
385 | otherwise permitted by the Creative Commons policies published at
386 | creativecommons.org/policies, Creative Commons does not authorize the
387 | use of the trademark "Creative Commons" or any other trademark or logo
388 | of Creative Commons without its prior written consent including,
389 | without limitation, in connection with any unauthorized modifications
390 | to any of its public licenses or any other arrangements,
391 | understandings, or agreements concerning use of licensed material. For
392 | the avoidance of doubt, this paragraph does not form part of the
393 | public licenses.
394 |
395 | Creative Commons may be contacted at creativecommons.org.
--------------------------------------------------------------------------------
/LICENSE-CODE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | Copyright (c) Microsoft Corporation
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
5 | associated documentation files (the "Software"), to deal in the Software without restriction,
6 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all copies or substantial
11 | portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
14 | NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
16 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
17 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Contributing
3 |
4 | This project welcomes contributions and suggestions. Most contributions require you to agree to a
5 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
6 | the rights to use your contribution. For details, visit https://cla.microsoft.com.
7 |
8 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
9 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
10 | provided by the bot. You will only need to do this once across all repos using our CLA.
11 |
12 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
13 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
14 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
15 |
16 | # Legal Notices
17 |
18 | Microsoft and any contributors grant you a license to the Microsoft documentation and other content
19 | in this repository under the [Creative Commons Attribution 4.0 International Public License](https://creativecommons.org/licenses/by/4.0/legalcode),
20 | see the [LICENSE](LICENSE) file, and grant you a license to any code in the repository under the [MIT License](https://opensource.org/licenses/MIT), see the
21 | [LICENSE-CODE](LICENSE-CODE) file.
22 |
23 | Microsoft, Windows, Microsoft Azure and/or other Microsoft products and services referenced in the documentation
24 | may be either trademarks or registered trademarks of Microsoft in the United States and/or other countries.
25 | The licenses for this project do not grant you rights to use any Microsoft names, logos, or trademarks.
26 | Microsoft's general trademark guidelines can be found at http://go.microsoft.com/fwlink/?LinkID=254653.
27 |
28 | Privacy information can be found at https://privacy.microsoft.com/en-us/
29 |
30 | Microsoft and any contributors reserve all others rights, whether under their respective copyrights, patents,
31 | or trademarks, whether by implication, estoppel or otherwise.
32 |
--------------------------------------------------------------------------------