What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-20 22:59:14
require express server.js
/* ====== create node.js server with express.js framework ====== */ // dependencies const express = require("express"); const app = express(); app.get("/", (req, res) => { res.send("This is home page."); }); app.post... Add solution -
Javascript 2021-11-18 00:39:18
express and node pakages
var express = require('express'); var app = express(); // This responds with "Hello World" on the homepage app.get('/', function (req, res) { console.log("Got a GET request for the homepage"); res.send('Hello GET'); }) // This ... Add solution -
Javascript 2021-11-17 19:14:11
how to connect to mongoose and create a model
const express = require('express'); const app = express(); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); app.use(bodyParser.json()); const PORT = process.env.PORT || 3000; //connecting to db try { mongoose.conne... Add solution -
Other 2021-11-16 15:39:20
app scrip sheet cell boarder
var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var cell = sheet.getRange("B2"); // Sets borders on the top and bottom, but leaves the left and right unchanged // Also sets the color to "red", and the bo... Add solution -
Javascript 2021-11-16 06:16:24
host angular app on node server
const express = require('express'); const http = require('http'); const path = require('path'); const app = express(); const port = process.env.PORT || 3001; app.use(express.static(__dirname + '/dist/my-app-name')); app.get('/*', (req, res) => res.... Add solution