relita

an encrypted, decentralized, peer-to-peer social network
Log | Files | Refs | README | LICENSE | git clone https://git.ne02ptzero.me/git/relita

commit 659fc8588ea7ad6600f0e0c7713180a780b1ad29
parent 2ee7010e0f7f9be2d0539b50491f700bdc158112
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Sun,  9 Apr 2017 16:52:00 +0200

Add(Tree): Add basic tree for node / electron app

Diffstat:
A.gitignore | 1+
MREADME.md | 16++++++++++++++++
Aindex.html | 17+++++++++++++++++
Amain.js | 38++++++++++++++++++++++++++++++++++++++
Apackage.json | 21+++++++++++++++++++++
Arenderer.js | 3+++
6 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/README.md b/README.md @@ -1,2 +1,18 @@ # Relita + An encrypted, decentralized, Peer to Peer social network. + +## Clone +``` +git clone https://github.com/Ne02ptzero/Relita +``` + +## Build +``` +npm install +``` + +## Start +``` +npm start +``` diff --git a/index.html b/index.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8"> + <title>Relita</title> + </head> + <body> + <center> + <h1>Relita</h1> + </center> + </body> + + <script> + // You can also require other files to run in this process + require('./renderer.js') + </script> +</html> diff --git a/main.js b/main.js @@ -0,0 +1,38 @@ +const electron = require('electron') +const app = electron.app +const BrowserWindow = electron.BrowserWindow + +const path = require('path') +const url = require('url') + +const sbot = require('scuttlebot') + +let mainWindow + +function createWindow () { + mainWindow = new BrowserWindow({width: 800, height: 600}) + + mainWindow.loadURL(url.format({ + pathname: path.join(__dirname, 'index.html'), + protocol: 'file:', + slashes: true + })) + + mainWindow.on('closed', function () { + mainWindow = null + }) +} + +app.on('ready', createWindow) + +app.on('window-all-closed', function () { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +app.on('activate', function () { + if (mainWindow === null) { + createWindow() + } +}) diff --git a/package.json b/package.json @@ -0,0 +1,21 @@ +{ + "name": "relita", + "version": "1.0.0", + "description": "An encrypted, decentralized, Peer to Peer social network", + "main": "main.js", + "scripts": { + "start": "electron main.js", + "postinstall": "npm run rebuild", + "rebuild": "npm rebuild --runtime=electron --target=1.6.2 --abi=50 --disturl=https://atom.io/download/atom-shell" + }, + "repository": "https://github.com/Ne02ptzero/Relita", + "author": "Ne02ptzero", + "license": "GPL", + "dependencies": { + "scuttlebot": "github:ssbc/scuttlebot#a53ebda4b34c959188ff6de955f55a348fe47251" + }, + "devDependencies": { + "electron": "~1.6.2", + "electron-rebuild": "^1.5.7" + } +} diff --git a/renderer.js b/renderer.js @@ -0,0 +1,3 @@ +// This file is required by the index.html file and will +// be executed in the renderer process for that window. +// All of the Node.js APIs are available in this process.