SHARE
TWEET

Untitled

a guest Jul 24th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var express = require('express');
  2. var pug = require('pug');
  3. var config = require('./config');
  4. var fs = require('fs');
  5. var router = express.Router();
  6. var utils = require('/utils');
  7.  
  8. router.get('/', function (req, res) {
  9.     console.log("ip - ", req.connection.remoteAddress)
  10.     res.send(pug.compileFile('views/main.pug')({
  11.         config
  12.     }))
  13. });
  14. module.exports = router;
  15.      
  16. function newTest() {
  17.  
  18. }
  19. module.exports.newTest = newTest;
  20.      
  21. $(document).ready(function() {
  22.     // I prefetch my models, then I have a callback to create an
  23. instance of the editor
  24.     preFetchAllModels(function() {
  25.     var models = monaco.editor.getModels();
  26.     // I check that I have my models (file1 and file2) prefetched before creating the editor
  27.     console.log("models", models);
  28.     monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true)
  29.  
  30.     monacoEditor =
  31. monaco.editor.create(document.getElementById("editor"), {
  32.         value: "loading...",
  33.         language: "javascript",
  34.         theme: 'monokai',
  35.         lineHeight: 20,
  36.         fontSize: 16,
  37.         wordWrap: "bounded",
  38.         automaticLayout: true,
  39.         wrappingIndent: 'indent'
  40.     });
  41. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top