2.4.75 • Published 4 years ago

@meteor-it/rocket v2.4.75

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Meteor.Rocket

Powerfull fullstack web framework

Features

  1. Routing
  2. Server Side Rendering
  3. Preloading data
  4. Advanced HTTP/2 support with optimizations
  5. Zarbis integration

Usage example

server/index.ts

import Logger from '@meteor-it/logger';
import NodeReceiver from '@meteor-it/logger/receivers/node';
import XPress from '@meteor-it/xpress';
import { ServerMiddleware } from '@meteor-it/rocket';
import rocket from '../web';
import {readFile, read} from '@meteor-it/fs';

Logger.addReceiver(new NodeReceiver());
const logger = new Logger('WEB');
const xpress = new XPress(logger);

(async () => {
    logger.log('Init server');
    xpress.use(null, new ServerMiddleware(rocket, { compiledClientDir: `${__dirname}/../client`, compiledServerDir: `${__dirname}` }));
    xpress.listenHttp('0.0.0.0', 8080);
    xpress.listenHttps('0.0.0.0', 8443, {
        key: await readFile(`${__dirname}/../../key.pem`),
        cert: await readFile(`${__dirname}/../../cert.pem`)
    })
})();

client/index.ts

import { initClient } from '@meteor-it/rocket';
import rocket from '../web';

initClient(rocket);

web/index.ts

import Rocket from '@meteor-it/rocket';

const rocket = new Rocket();
rocket.router.on(null, null, async ctx => {
    // drawTarget = element which will be rendered on page finally
    ctx.state.drawTarget = h([
        'Hello, world!'
    ]);
});
2.4.75

4 years ago

2.4.74

4 years ago

2.4.73

4 years ago

2.4.72

4 years ago

2.4.71

4 years ago

2.4.70

4 years ago

2.4.68

5 years ago

2.4.67

5 years ago

2.4.66

5 years ago

2.4.64

5 years ago

2.4.63

5 years ago

2.4.61

5 years ago

2.4.60

5 years ago

2.4.59

5 years ago

2.4.58

5 years ago

2.4.57

5 years ago

2.4.55

5 years ago

2.4.54

5 years ago

2.4.53

5 years ago

2.4.52

5 years ago

2.4.51

5 years ago

2.4.50

5 years ago

2.4.49

5 years ago

2.4.48

5 years ago

2.4.47

5 years ago

2.4.46

5 years ago

2.4.45

5 years ago

2.4.44

5 years ago

2.4.43

5 years ago

2.4.42

5 years ago

2.4.41

5 years ago

2.4.39

5 years ago

2.4.38

5 years ago

2.4.37

5 years ago

2.4.36

5 years ago

2.4.35

5 years ago

2.4.32

5 years ago

2.4.31

5 years ago

2.4.30

5 years ago

2.4.29

5 years ago

2.4.28

5 years ago

2.4.27

5 years ago

2.4.26

5 years ago

2.4.25

5 years ago

2.4.24

5 years ago

2.4.23

5 years ago

2.4.22

5 years ago

2.4.21

5 years ago

2.4.20

5 years ago

2.4.19

5 years ago

2.4.18

5 years ago

2.4.17

5 years ago

2.4.16

5 years ago

2.4.15

5 years ago

2.4.14

5 years ago

2.4.13

5 years ago

2.4.12

5 years ago

2.4.11

5 years ago

2.4.10

5 years ago

2.4.9

5 years ago

2.4.5

5 years ago

2.4.4

5 years ago

2.4.3

6 years ago

2.4.2

6 years ago

2.4.1

6 years ago

2.4.0

6 years ago

2.3.4

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago