Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var express = require('express');
- var pug = require('pug');
- var config = require('./config');
- var fs = require('fs');
- var router = express.Router();
- var utils = require('/utils');
- router.get('/', function (req, res) {
- console.log("ip - ", req.connection.remoteAddress)
- res.send(pug.compileFile('views/main.pug')({
- config
- }))
- });
- module.exports = router;
- function newTest() {
- }
- module.exports.newTest = newTest;
- $(document).ready(function() {
- // I prefetch my models, then I have a callback to create an
- instance of the editor
- preFetchAllModels(function() {
- var models = monaco.editor.getModels();
- // I check that I have my models (file1 and file2) prefetched before creating the editor
- console.log("models", models);
- monaco.languages.typescript.javascriptDefaults.setEagerModelSync(true)
- monacoEditor =
- monaco.editor.create(document.getElementById("editor"), {
- value: "loading...",
- language: "javascript",
- theme: 'monokai',
- lineHeight: 20,
- fontSize: 16,
- wordWrap: "bounded",
- automaticLayout: true,
- wrappingIndent: 'indent'
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement