<commit_before># skeleton-ecrm-nodejs
Customer Relationship Management module skeleton in NodeJS

## Usage
Clone the repo, install and launch:
```
git clone https://github.com/underscorenico/skeleton-ecrm-nodejs.git
cd skeleton-ecrm-nodejs
npm install
npm start
```
The start script will run the server (using nodemon) on port 3000 (http://localhost:3000)
## Overview
This skeleton provides an API for CRM (Customer Relationship Management). CRM is a central module in every e-commerce application since it manages users (buyers / sellers), organizations, sessions, etc.
<br>
The routes provide a very simple profile CRUD as well as the session management (login and logout).

### Profiles
The profile API contains 5 routes:
 
Method | URL (relative) | Description 
--- | --- | --- 
POST | /profiles | Create a profile
GET | /profiles/*{id}* | Retrieve a profile 	
GET | /profiles | Retrieve all profiles
PUT | /profiles/*{id}* | Update a profile 	
DELETE | /profiles/*{id}* | Delete a profile 	

The ```profile``` model that is to be passed in the POST request is the following:
<commit_msg>readme: Add angular 2 skeleton link<commit_after># skeleton-ecrm-nodejs
Customer Relationship Management module skeleton in NodeJS

## Usage
Clone the repo, install and launch:
```
git clone https://github.com/underscorenico/skeleton-ecrm-nodejs.git
cd skeleton-ecrm-nodejs
npm install
npm start
```
The start script will run the server (using nodemon) on port 3000 (http://localhost:3000)
## Overview
This skeleton provides an API for CRM (Customer Relationship Management). CRM is a central module in every e-commerce application since it manages users (buyers / sellers), organizations, sessions, etc.
<br>
The routes provide a very simple profile CRUD as well as the session management (login and logout).
<br>
<br>
**Note**: For a working web app skeleton in Angular 2 check out [this repo][angular2].

[angular2]: https://github.com/JunkyDeLuxe/angular4-starter

### Profiles
The profile API contains 5 routes:
 
Method | URL (relative) | Description 
--- | --- | --- 
POST | /profiles | Create a profile
GET | /profiles/*{id}* | Retrieve a profile 	
GET | /profiles | Retrieve all profiles
PUT | /profiles/*{id}* | Update a profile 	
DELETE | /profiles/*{id}* | Delete a profile 	

The ```profile``` model that is to be passed in the POST request is the following:

{'fraction_non_alphanumeric': 0.10279187817258884, 'fraction_numerical': 0.00972927241962775, 'mean_word_length': 4.279017857142857, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4951610', 'n_tokens_mistral': 720, 'n_tokens_neox': 654, 'n_words': 295}