This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Hangfire; | |
| using Microsoft.Owin.Hosting; | |
| GlobalConfiguration.Configuration.UseSqlServerStorage("hangfire"); | |
| StartOptions options = new StartOptions(); | |
| options.Urls.Add("http://localhost:9095"); | |
| options.Urls.Add("http://127.0.0.1:9095"); | |
| options.Urls.Add($"http://{Environment.MachineName}:9095"); | |
| WebApp.Start<Startup>(options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.Owin; | |
| using Owin; | |
| using Hangfire; | |
| [assembly: OwinStartup(typeof(WindowsService.Startup))] | |
| namespace WindowsService | |
| { | |
| public class Startup | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fileSystemModule = require("file-system"); | |
| var fileName = "persistedFile.json"; | |
| var file = fileSystemModule.knownFolders.documents().getFile(fileName); | |
| var data = [{"id": "1", "value": "NativeScript"}, ...]; | |
| // write data to the file, converted to a JSON string first | |
| file.writeText(JSON.stringify(data)); | |
| // read data from the file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var observableArrayModule = require("data/observable-array"); | |
| var fsModule = require("file-system"); | |
| var offline_view_model = { | |
| OfflineViewModel: function(fileName, items) { | |
| var viewModel = new observableArrayModule.ObservableArray(items); | |
| viewModel._fileName = fileName; | |
| viewModel.loadOffline = function() { | |
| // clear out current view model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var offlineModule = require("./modules/offline/offline"); | |
| exports.onTapClear = function() { | |
| console.log("clearing file"); | |
| offlineModule.remove().then(function() { | |
| console.log("finished clearing file"); | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var fsModule = require("file-system"); | |
| var offline = { | |
| _fileName: "offline-data.json", | |
| write: function(data) { | |
| var file = fsModule.knownFolders.documents().getFile(offline._fileName); | |
| return file.writeText(JSON.stringify(data)); | |
| }, | |
| remove: function() { | |
| var file = fsModule.knownFolders.documents().getFile(offline._fileName); | |
| return file.remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var name = "Mike"; | |
| var age = 77; | |
| var concat = $"My name is {name}, and I am {age} years old."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var name = "Mike"; | |
| var age = 77; | |
| var concat = String.Format("My name is {0}, and I am {1} years old.", name, age); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var name = "Mike"; | |
| var age = 77; | |
| var concat = "My name is " + name + ", and I am " + age + " years old."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require("gulp"); | |
| var minify = require("gulp-minify-css"); | |
| gulp.task("css", function () { | |
| return gulp.src("./style/style.css") | |
| .pipe(minify()) | |
| .pipe(dest("./output/style")) | |
| .pipe(dest("./anotherOutput/style)); | |
| }); |