Code Monkey home page Code Monkey logo

Comments (13)

Froxcey avatar Froxcey commented on August 17, 2024 2

I think it would be nice to have a template repo for creating a Zap application, many other backend projects has the same thing.

vibe

from zap.

renerocksai avatar renerocksai commented on August 17, 2024 1

Please make a more concrete suggestion. Zig creates the build.zig for you, you only have to paste in 2 lines.

To be honest, I am thinking that if that's too much hassle, one is probably better off trying something else.

DX 🤣: "I want to dev but put ZERO effort into it"

Where would we even put the extra file and how should people looking for "DX" find it? Plus, they'd need the zon file, too. I might be stupid but if I even parse you correctly, what I think you want doesn't sound thought through well.

I value my time, too. Maybe the best way forward is you submit a PR.

from zap.

renerocksai avatar renerocksai commented on August 17, 2024 1

What do you mean by pushing to main repo branch? That doesn't make sense to me.

To be git-clonable, the "starter project" should be its own repo, e.g.: zigzap/hello.

I would clean up your template:

  • explain what it actually does (e.g. when it runs)
  • since it also serves a public folder, this folder should exist and contain at least something.
  • it should be made clear that the public folder content takes precedence over the callback (avoid surprises!)
  • it should start with only one worker or else people will shoot themselves in the foot trying to share state
  • remove the stupid test
  • at least mention zig build run

None of the above is hard. Creating such a starter template probably takes only a few minutes.

The more complicated part is: keeping it up-to-date with zap releases (build.zig.zon). Can that be done easily, ideally in a GH action when rolling a release? I guess the easiest option is to have a daily GH workflow that clones zap master, checks for zon changes in the README of zap, and commits a zon update to the starter. Then a second GH workflow that checks if it still builds with the latest zon update - so I get at least notified when the starter gets broken by a zap release.

Instead of parsing the README, I could also update zap's release workflow to update a json file that can easily be curled from the starter template workflow.

I don't have time ATM but that's what I'm thinking about.

from zap.

renerocksai avatar renerocksai commented on August 17, 2024 1

for now maybe https://github.com/zigzap/hello-world will do

from zap.

renerocksai avatar renerocksai commented on August 17, 2024

Did you read the README?

There is a build.zig.zon and an example for what to do in your build.zig, after you have run zig init-exe.

I want to close but maybe I don't get your question. If so, please elaborate in full sentences.

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

Yeah yeeah there is man.. but it the reaadme is too much so that might not be cool on dx side.. thats why no worries man ;)

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

hmm.. you got a point but the reason i raised is because of i just told my friend about this means zap for building web servers yeah but i really send the link to this github repo and he was confused to where it starts thats why i guess it needs a prior xp on setting up stuff for local dev and playing around with sys lang makes the hassle little bit less :) .... personally does not have a problem but he was kind of heck confused to start off but yeah what i suggested to paste the code from build.zig or build.zon.zig. .. You are absolutely correct but people get reffered to this might be interested on some mini things that they could narrow there scope like just fork and get to the point.. idk but for me it is fine .

from zap.

renerocksai avatar renerocksai commented on August 17, 2024

Aaaaah, got you! Maybe point your friend further down in the readme: https://github.com/zigzap/zap#getting-started

Further down it shows how to create a zig project and add zap in easy steps.

The only easier alternative I can think of is creating a sample project that others can just fork. Updating that for every release is a bit of extra work. I have one for zig master, so yeah, maybe making an official one and linking to it in a prominent place would help.

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

yep man that is what i am saying... you got me...that would be too nice

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

@renerocksai If you want zap starter template for custom or from scratch projects you can use my template here - https://github.com/Kinfe123/zap-zig-starter

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

@renerocksai shall i contribute this on main branch the above starter ... which can pushed on to branch

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

yeah i am basing my thought based on the templating stuff that mention and yeah it was also thinking syncing up using GH that can checkout to the master ..

from zap.

Kinfe123 avatar Kinfe123 commented on August 17, 2024

yeah got you on the clean up .. since i am introducing it to the public i just get the fresh copy of zig init and start adding necessary files to make sure it works but as you said it needs really a clean up that to make sure it actually makes sense

from zap.

Related Issues (20)

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.