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
"use client"; | |
import * as React from "react"; | |
import { Input } from "@/components/ui/Input"; | |
import { Button } from "@/components/ui/Button"; | |
import { | |
AlertDialog, | |
AlertDialogContent, | |
AlertDialogHeader, | |
AlertDialogTitle, | |
AlertDialogDescription, |
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
// Expressjs REST APIs | |
const express = require('express'); | |
const app = express(); | |
cosnt router = express.Router(); | |
let getUsersHandler = (req, res, next)=> { | |
//fetch users from database via ORM | |
res.send('Get - list users'); | |
} |
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
//Expressjs landing page | |
const express = require('express'); | |
const app = express(); | |
app.get('/', (req, res) => { | |
res.send('Hello world, this is landing page'); | |
}); | |
let server = app.listen(3000, ()=> { | |
console.log('Express is listening to http://localhost:3000'); |
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
//Expressjs server setup | |
const express = require('express'); | |
const app = express(); | |
let server = app.listen(3000, ()=> { | |
console.log('Express is listening to http://localhost:3000'); | |
}); | |
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
//ES5 example | |
var flattenES5 = function (arr) { | |
return [].concat.apply([], arr.map(function (element) { | |
return Array.isArray(element) ? flatten(element) : element; | |
})) | |
} | |
//ES6 example |
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
{ | |
"name": "Report", | |
"version": "0.0.0", | |
"description": "report", | |
"homepage": "http://trailsjs.io", | |
"author": { | |
"name": "Nishchit Dhanani", | |
"email": "", | |
"url": "https://github.com/trailsjs" | |
}, |
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
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |