This file contains 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
int port = 8080; | |
NonAdminHttp.EnsureCanListenToWhenInNonAdminContext(port); | |
var docStore = new EmbeddableDocumentStore {DataDirectory = "Data", UseEmbeddedHttpServer = true}; | |
var ravenConfiguration = _docStore.Configuration; | |
ravenConfiguration.Port = port; | |
// OPTIONAL: ravenConfiguration.WebDir = "Web"; | |
// OPTIONAL: ravenConfiguration.DataDirectory = "Data"; | |
// OPTIONAL: ravenConfiguration.DefaultStorageTypeName = "esent"; |
This file contains 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
this.registerOnServer = function () { | |
$.post("/api/ToDo", getDataModel()); | |
}; | |
this.removeFromServer = function () { | |
$.ajax({ | |
type: "DELETE", | |
url: "/api/ToDo/" + self.guid | |
}); | |
}; |
This file contains 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 ToDoItem = function() { | |
var self = this; | |
return { | |
guid: "", | |
title: "", | |
completed: false, | |
}; | |
}; |
This file contains 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
[JavaScript] | |
public class ToDoItem | |
{ | |
public Guid guid { get; set; } | |
public string title { get; set; } | |
public bool completed { get; set; } | |
} |
This file contains 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
define(["text!/../home/hello"], function (template) { | |
// ... Here is your code ... | |
}); |
This file contains 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
// | |
// GET: /Home/Hello | |
public ActionResult Hello() | |
{ | |
var serverInfo = new ServerInfo {Id = "Smart Server "}; | |
return View(serverInfo); | |
} |
This file contains 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
<div id="home" style="border: 2px; background: #FF0097;"> | |
<h2>Welcome to "Honey-do-list"<br/>from a "@Model.Id"</h2> | |
</div> |
This file contains 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
This is a test Gist |