Added datastore export to README

This commit is contained in:
frikky
2020-05-24 06:09:52 +02:00
parent f3024f013c
commit bd375f3a28
4 changed files with 11 additions and 6 deletions
+3 -2
View File
@@ -36,15 +36,16 @@ Documentation can be found on https://shuffler.io/docs/about or in your own inst
Open an issue on Github, or [join the gitter chat](https://gitter.im/Shuffle-SOAR/community). For other / private requests: [frikky@shuffler.io](mailto:frikky@shuffler.io) Open an issue on Github, or [join the gitter chat](https://gitter.im/Shuffle-SOAR/community). For other / private requests: [frikky@shuffler.io](mailto:frikky@shuffler.io)
### Setup - Local development ### Setup - Local development
Frontend - requires [npm](https://nodejs.org/en/download/)/[yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable)/your preferred manager. Runs independently from backend - edit frontend/src/App.yaml (line 46~) from window.location.origin to http://YOUR IP:5001 Frontend - requires [npm](https://nodejs.org/en/download/)/[yarn](https://yarnpkg.com/lang/en/docs/install/#debian-stable)/your preferred manager. Runs independently from backend - edit frontend/src/App.yaml (line 44~) from window.location.origin to http://YOUR IP:5001
```bash ```bash
cd frontend cd frontend
npm i npm i
npm start npm start
``` ```
Backend - API calls - requires [>=go1.13](https://golang.org/dl/) and [gcloud](https://cloud.google.com/sdk/install) Backend - API calls - requires [>=go1.13](https://golang.org/dl/)
```bash ```bash
export DATASTORE_EMULATOR_HOST=0.0.0.0:8000
cd backend/go-app cd backend/go-app
go build go build
go run *.go go run *.go
+4
View File
@@ -5824,6 +5824,9 @@ func runInit(ctx context.Context) {
log.Printf("Downloading OpenAPI data for search - EXTRA APPS") log.Printf("Downloading OpenAPI data for search - EXTRA APPS")
apis := "https://github.com/frikky/OpenAPI-security-definitions" apis := "https://github.com/frikky/OpenAPI-security-definitions"
// THis gets memory problems hahah
//apis := "https://github.com/APIs-guru/openapi-directory"
fs := memfs.New() fs := memfs.New()
storer := memory.NewStorage() storer := memory.NewStorage()
cloneOptions := &git.CloneOptions{ cloneOptions := &git.CloneOptions{
@@ -5833,6 +5836,7 @@ func runInit(ctx context.Context) {
if err != nil { if err != nil {
log.Printf("Failed loading repo %s into memory: %s", err) log.Printf("Failed loading repo %s into memory: %s", err)
} else { } else {
log.Printf("Finished getting data.. Now looking for updates")
dir, err := fs.ReadDir("") dir, err := fs.ReadDir("")
if err != nil { if err != nil {
log.Printf("Failed reading folder: %s", err) log.Printf("Failed reading folder: %s", err)
+2 -2
View File
@@ -38,10 +38,10 @@ import AlertTemplate from "react-alert-template-basic";
import { positions, Provider } from "react-alert"; import { positions, Provider } from "react-alert";
// Testing - localhost // Testing - localhost
const globalUrl = "http://192.168.3.6:5001" //const globalUrl = "http://192.168.3.6:5001"
// Production - backend proxy forwarding in nginx // Production - backend proxy forwarding in nginx
//const globalUrl = window.location.origin const globalUrl = window.location.origin
const surfaceColor = "#27292D" const surfaceColor = "#27292D"
const inputColor = "#383B40" const inputColor = "#383B40"
+2 -2
View File
@@ -511,7 +511,7 @@ const Apps = (props) => {
: :
<Paper square style={uploadViewPaperStyle}> <Paper square style={uploadViewPaperStyle}>
<h4> <h4>
Try a broader search term. E.g. "http" or "TheHive" Try a broader search term, e.g. "http", "alert", "ticket" etc.
</h4> </h4>
<div/> <div/>
@@ -651,7 +651,7 @@ const Apps = (props) => {
return response.json() return response.json()
}) })
.then((responseJson) => { .then((responseJson) => {
console.log(responseJson) //console.log(responseJson)
if (responseJson.success) { if (responseJson.success) {
if (responseJson.reason !== undefined && responseJson.reason.length > 0) { if (responseJson.reason !== undefined && responseJson.reason.length > 0) {
setFilteredApps(responseJson.reason) setFilteredApps(responseJson.reason)