Coder Social home page Coder Social logo

robhumphris / acra-node-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from warsclon/acra-node-server

0.0 2.0 0.0 321 KB

Server ACRA for Node.js with data base Mongodb

Home Page: http://warsclon.github.com/acra-node-server

JavaScript 44.28% CSS 2.43% HTML 53.06% Shell 0.22%

acra-node-server's Introduction

ACRA Node Server (v. 0.0.4)

Server ACRA for Node.js with data base Mongodb

Save all the crash reports in your own server.

version 0.0.4

  • Updated to work with Express 4.x
  • Updated to work with newer MongoDB

version 0.0.3

  • Statistics by android version.
  • Statistics by date error.

version 0.0.2

  • Statistics by mobile.

Technologies Used

Server = [node.js, express, ejs, mongodb, emailjs, node-properties-parser, colors, moment, async]

Client = [bootstrap, jquery, tablesorter, jqplot]

Installation

  1. Download and unzip (or git clone) into a directory.
  2. Run "$ npm install"
  3. Configure /acra_server.properties with mongodb, port web, user and password access and email credentials.
  4. Run app via "$ node appAcra"

Philosophy

  • Build a Server to replace Google Docs.
  • Write using modern tecnologies as Node.js and Mongodb.
  • Simple configuration with a only one properties file.
  • Interface using Bootstrap.

Features

  • Basic front end web pages.
  • Send emails when receive ACRA report.
  • Login system to protect access.
  • Export all reports in json format.
  • Export detail report in json format.
  • Delete report.
  • Multiple applications in the same server.
  • Separate the crash in differents collections by app

If you have previously version 0.0.2 or 0.0.1

You need to convert the USER_CRASH_DATE from Text to Date format, the solution is execute a script:

modify_db.js

Edit the script:

var NAME_COLLECTION = "your_collection";
var DB_URL = "mongodb://127.0.0.1:27017/your_db";

And Execute

node modify_db.js

How to config ACRA Class in Android

  1. Config Acra Class in application with the url of the server

  2. Configuration URL in Java Class (http://SERVER:PORT_SERVER/logs/NAME_APP)

2.1. SERVER (IP or DNS)

2.2. PORT_SERVER (PORT WEB SERVER)

2.3. NAME_APP (NAME APP where will be save all the crash)

  • Example url: http://my_server:port_server/logs/my_app
import org.acra.*;
import org.acra.annotation.*;
@ReportsCrashes(formUri = "http://SERVER:PORT_SERVER/logs/NAME_APP", formKey="")
public class MyApplication extends Application {
  @Override
  public void onCreate() {
    // The following line triggers the initialization of ACRA
    ACRA.init(this);
    super.onCreate();
  }
}

More information about configuration Android application here

Config acra_server.properties

# CONFIGURATION WEB
# Acra web server port 
port_web = 3000
# Web access user
username = john
# Web acess password
password = john
# Cookie config
key = acraserver
secret = b29a25fe160453b475d4243d12yrty342345752eeaa5bc

# CONFIGURATION MONGODB
# port mongodb
mongodb_port = 27017
# Ip mongodb
mongodb_ip = localhost
# Name Data base
name_database = acraloggerdb


# CONFIGURATION MAIL
# yes or no if want send email if acra error recive
send_mail = yes

# config connection email server
user_mail= [email protected]
password_mail = password_mail_gmail
host =smtp.gmail.com
ssl = true

# config email
subject = Acra Error Server
from = [email protected]
# List emails separate with comma example john@gmail,[email protected]
to = [email protected],[email protected]

#config date
date_format=YYYY-MM-DD hh:mm:ss

Configuration Mongodb

Automatic configuration:

  • Creation of DB automatic
  • Creation collection automatic
  • Independent collections by App

Access server

  • http://my_server:port_server (and login)

##Thank you

Paolo Casarini that made the original implementation:

http://www.casarini.org/blog/2013/acra-nodejs-mongodb/

License

( The MIT License )

Copyright (c) 2013 Diego Martin Moreno

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

acra-node-server's People

Contributors

robhumphris avatar warsclon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.