1.1.5 • Published 8 months ago
roadman v1.1.5
An efficient, and flexible NodeJS library for building backend services.
Roadman Features
Feature | Progress |
---|---|
CORE: expressjs, rest/graphql api, redis, queue, subscriptions | ✅ |
Couchbase - couchset orm | ✅ |
Auth & User - phone login, create user resolvers | ✅ |
Firebase - auth, storage, e.t.c | ✅ |
1. Install
npm i roadman --save
2. Basic example
import {roadman} from 'roadman';
import {Resolver, Query} from 'couchset';
// Create a demo GraphQL resolver
@Resolver()
class ExampleResolver {
@Query(() => [String], {nullable: true})
async apps(): Promise<string[]> {
return ['Apps', 'one', 'two'];
}
}
// run roadman
await roadman({resolvers: [ExampleResolver]});
3. With model automation
import {roadman} from 'roadman';
import {Model, ObjectType, InputType, Field} from 'couchset';
@InputType('PersonInput')
@ObjectType()
class Person {
@Field(() => String, {nullable: true})
id?: string = '';
@Field(() => String, {nullable: true})
firstname?: string = '';
@Field(() => String, {nullable: true})
lastname?: string = '';
@Field(() => Number, {nullable: true})
phone?: number = 0;
}
const PersonModel = new Model('Person', {graphqlType: Person});
const {resolver} = PersonModel.automate({
getById: {public: true},
createUpdate: {public: true},
pagination: {public: true},
});
await roadman({resolvers: [resolver]});
3. With auth/user resolvers
import { couchsetRoadman } from '@roadmanjs/couchset';
import { firebaseRoadman } from '@roadmanjs/firebase-admin';
import { getAuthResolvers } from '@roadmanjs/auth';
import { roadman } from "roadman";
const resolvers = [...getAuthResolvers()];
const run = async () => {
await roadman({
roadmen: [firebaseRoadman, couchsetRoadman],
resolvers,
})
}
run();
1.1.5
8 months ago
1.1.4
8 months ago
1.1.3
8 months ago
1.1.2
8 months ago
1.1.1
8 months ago
1.0.2
8 months ago
1.1.0
8 months ago
1.0.1
8 months ago
1.0.9
8 months ago
1.0.8
8 months ago
1.0.6
8 months ago
1.0.5
8 months ago
1.0.4
8 months ago
1.0.3
8 months ago
0.3.9
2 years ago
0.3.17
2 years ago
0.3.16
2 years ago
0.3.15
2 years ago
0.3.14
2 years ago
0.3.13
2 years ago
0.3.12
2 years ago
0.3.11
2 years ago
0.3.10
2 years ago
0.3.18
2 years ago
0.3.5
3 years ago
0.3.4
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.19
3 years ago
0.1.18
3 years ago
0.1.12
4 years ago
0.1.13
4 years ago
0.1.14
3 years ago
0.1.15
3 years ago
0.1.16
3 years ago
0.1.17
3 years ago
0.1.11
4 years ago
0.1.10
4 years ago
0.1.8
4 years ago
0.1.9
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.0
4 years ago
0.0.2
4 years ago
0.0.0
4 years ago