npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pillar-combined-backend-server

v1.0.8

Published

Registration backend for the Pillar Wallet

Downloads

1

Readme

Installation

  1. run npm install -g yarn sequelize-cli
  2. run yarn install
  3. copy /.sample.env file to /.env with your local development settings

Running the project

To run the project in dev mode use yarn start-dev

For the production mode use yarn start

Development

To enable dev mode - add NODE_ENV=development to .env file

Good article to understand sequelize: https://scotch.io/tutorials/getting-started-with-node-express-and-postgres-using-sequelize

Migrations

  1. to create new model run sequelize model:create --name todoItem --attributes content:string,complete:boolean
  2. to create empty migration run sequelize migration:create --name create-user
  3. to run migrations and sync db use sequelize db:migrate

Seeding To populate sample data into db use: sequelize db:seed:all

Unit tests

$ npm test

Test reports

$ npm run test:Coverage
$ open ./reports/jest/test-report.html
$ open ./reports/lcov-report/index.html

Static Analysis

$ npm run plato
$ open ./reports/plato/index.html

Local dev setup

easiest way - install xampp. this gives one click install of mysql and phpmyadmin. https://www.apachefriends.org/download.html download latest stable ( non VM )package for your operating system and install it. Ignore any extras like bitnami!

run Xampp from applications. this opens Xampp control pannel, hit start. goto services tab, start mysql and apache.

Browse to http://localhost:80 you should get the xampp home page, with a link to phpmyadmin. If not, restart computer, relaunch Xampp

run xampp management console, start mysql and apache. goto localhost (default port - 80) - should open the console with a link to php.

edit your .env file:

To connect phpmyadmin to a remote mysql instance (useful for getting sql dumps etc) - find config.inc.php

DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=pillar
NODE_ENV=development

Connect local core-wallet to local core-wallet-backend Note - pending merge of search-bar branch... in providers/api/api.ts // const REGISTRATION_URL_ROOT = "http://127.0.0.1:8080/"; const REGISTRATION_URL_ROOT = 'https://pillar-registration.herokuapp.com/' Manually uncomment line pointing to 127... and comment out one pointing to heroku.

TODO: make front and backend configurable by env.

To connect phpmyadmin to a remote mysql instance (useful for getting sql dumps etc) - find config.inc.php

for Mac, you may need sudo to edit it as under /Applications, e.g. sudo nano /Applications/XAMPP/xamppfiles/phpmyadmin/config.inc.php

$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = '[FILL]';
$cfg['Servers'][$i]['password'] = '[FILL]';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'node.pillarproject.io';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Tip for testing new routes locally - turn off message signing by not using { checkSignature } middleware in route makes it simpler.