mirror of
https://github.com/zhigang1992/deployd.git
synced 2026-05-24 05:47:45 +08:00
30 lines
625 B
Plaintext
30 lines
625 B
Plaintext
<div class="authed">
|
|
<h2>My Apps</h2>
|
|
<h3>alpha!</h3>
|
|
<ul id="apps">
|
|
</ul>
|
|
<h4>Create an app...</h4>
|
|
<input type="text" id="name" />
|
|
<button id="create">create new</button>
|
|
</div>
|
|
|
|
<script>
|
|
d('/search/apps', {creator: 'skawful@gmail.com'}, function(res) {
|
|
$.each(res.results, function(i, item) {
|
|
$('#apps').append(
|
|
$('<li />').text(item.name + ' @ ' + item.host + '.deploydapp.com')
|
|
)
|
|
})
|
|
});
|
|
|
|
$('#create').click(function() {
|
|
var name = $('#name').val();
|
|
d('/app', {name: name}, function(res) {
|
|
console.log(res);
|
|
if(res._id) window.location.reload();
|
|
})
|
|
});
|
|
</script>
|
|
|
|
|