1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00
ipfs-boards/server.js
2015-11-04 16:41:17 +01:00

19 lines
388 B
JavaScript
Executable File

#!/usr/bin/env node
var ipfs = require('ipfs-api')('localhost','5001')
var express = require('express')
var app = express()
// Serve files in ./static
app.use(express.static('static'))
// CatchAll route: serve the angular app
app.get('*',function(req,res){
res.sendFile(__dirname+'/static/index.html')
})
// Start http server
app.listen(3000,function(){
console.log('Started')
})