Code Monkey home page Code Monkey logo

planety / prologue-examples Goto Github PK

View Code? Open in Web Editor NEW
31.0 9.0 6.0 1.79 MB

A repository to host examples for Prologue framework written in Nim language.

License: Apache License 2.0

Nim 96.25% HTML 1.07% CSS 2.23% Shell 0.45%
webframework web-framework fullstack-development full-stack-web-development nimlang nim http-server http-framework webapp-framework webapp-example async async-web-applications prologue prologue-framework karax webdev jester webdevelopment

prologue-examples's Introduction

Prologue framework examples repository

A repository to host examples for Prologue framework.

โš ๏ธ These examples are under development and may change in the future.

Prerequisites

  • Installed Nim compiler (v1.4.0 or above)
  • Installed Prologue framework (v.0.4.0 or above)

You can install Prologue via Nimble: nimble install prologue (or nimble install prologue@#head if you want to get the latest version).

Compile and run examples

Simply call nim compile --run app.nim inside of particular example directory and access 127.0.0.1:8080 URL in your browser. Some examples might have different port number.

HTTP server

Requests

Responses

Middleware

Cookies

Database

Sample Apps

TODO

  • cors is WIP
  • norm_crud is WIP

Authors

Innokentiy Sokolov, Zeshen Xing, Xie Yanbo

prologue-examples's People

Contributors

dlcmh avatar keshon avatar lytedev avatar ringabout avatar xyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prologue-examples's Issues

HelloWorld example does not compile

Hi team prologue,

I have a few years of Python under my beld but am new to Nim. I was amazed by the numer of examples and look forward to working with Prologue! Yet the basic helloworld example does not compile with the latest versions of Nim and Prologue (via choosenim). The error I get is:

Error: unhandled exception: key not found: staticDir [KeyError]

but the compiler does not tell me in which variable the key is missing. The same happens when I copy and paste from the docs ("serve static files").

import prologue
import prologue/middlewares/staticfile


var app = newApp(settings = settings)
app.use(staticFileMiddleware(env.get("staticDir")))
# add your routes
app.run()

Is there something wrong with my setup or do I miss something. Anyway. I filed this issue, because the examples should run "as-is", right?

Thanks for your hard work and have a nice day!

Cheers,
Frank

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.