Git Product home page Git Product logo

angela-js's Introduction

Description

SSH2 client and server modules written in pure JavaScript for node.js.

Table of Contents

Requirements

Installation

If you're installing Angela.js from NPM, you just have to run the following command:

> npm install angela-js -g

If you're installing Angela.js from Github Repo, you just have to run the following commands:

> git clone https://github.com/jmfranci/angela-js.git
> cd angela-js
> npm install
> npm link

To ensure that Angela.js is correctly installed in your machine, execute the following command to check your Angela.js version

> angela --version

Create New Angela.js Project

To create a new Angela.js project, run the following command:

> angela init <ProjectName>

If the project name is not provided, Angela will prompt the user to enter a project name.

After the project is created, the following folder three is available

<ProjectName>
    ├── config
    ├── controllers
    ├── middleware
    ├── models
    ├── node_modules
    ├── routes
    |   └── home.js  
    ├── startup
    |   └── routes.js                
    ├── .gitignore
    ├── index.js
    ├── package.json
    ├── package-lock.json
    ├── startup
    └── README.md

Run project

To run your Angela.js project, execute the following command:

> cd <ProjectName>          #If you're not in the project directory
> angela run

This should open a connection to the http://localhost:3000.

Generate command

The generate command is responsible for generating any type of file to an Angela.js project. The generate command can be used with either angela g or angela generate.

Model

To generate a model, you write the following:

> angela g model <ModelName>

If model name is not provided, angela will prompt user to enter model name.

> angela g model user

The file is created at ProjectName/models/user.js

//Customize this model

const mongoose = require('mongoose');
const Joi = require('joi');

const userSchema = new mongoose.Schema({

});

const user = mongoose.model('user', genreSchema);

function validateuser(user) {
	const schema = {

	};
	return Joi.validate(user, schema);
}

module.exports.validateuser = validateuser;
module.exports.user = user;
module.exports.userSchema = userSchema;

Add properties to the model

You can also add properties to your model right from the command line. To do so, you need the following command:

angela g model user -p name.str.req

angela-js's People

Contributors

jmfranci avatar dependabot[bot] avatar

Watchers

 avatar Mateus Jose avatar

angela-js's Issues

Add module for authentication

This module will allow users to quickly set up authentication. This authentication should contain login and sign up end points.

Destroy route

This command should allow users to destroy routes

Destroy model

This command should allow users to destroy models

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.