@jajoosam/

tyni-starter

Express

Start building your own URL shortener

fork
loading
Files
  • index.js
  • static
  • package.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8594650278179217","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Ly8gRXhwcmVzcyDwn4yQCmNvbnN0IGV4cHJlc3MgPSByZXF1aXJlKCdleHByZXNzJyk7CmNvbnN0IGFwcCA9IGV4cHJlc3MoKTsKYXBwLnVzZShleHByZXNzLnN0YXRpYygnc3RhdGljJykpCgovLyBEYXRhYmFzZSDwn5eD77iPCnZhciBqc29uc3RvcmUgPSByZXF1aXJlKCdqc29uc3RvcmUuaW8nKSAKbGV0IGRiID0gbmV3IGpzb25zdG9yZShwcm9jZXNzLmVudi5LRVkpCgoKLy8gTGlzdGVuZXIg8J+RggphcHAubGlzdGVuKDMwMDAsICgpID0+IGNvbnNvbGUubG9nKCdzZXJ2ZXIgc3RhcnRlZCcpKTs="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
// Express 🌐
const express = require('express');
const app = express();
app.use(express.static('static'))

// Database 🗃️
var jsonstore = require('jsonstore.io') 
let db = new jsonstore(process.env.KEY)


// Listener 👂
app.listen(3000, () => console.log('server started'));