trails icon indicating copy to clipboard operation
trails copied to clipboard

Request for sample CRUD app

Open jsandhol opened this issue 8 years ago • 7 comments

Would it be possible to get a working CRUD example for total beginners like myself? With ORM and maybe without (if that's even supported). Just to get the correct/best practise example... Best would be 2 entities with 1:n relation but I'd settle on 1 entity sample too (the Person?). Thanks in any case for the work you're doing!

jsandhol avatar Apr 07 '17 07:04 jsandhol

@jsandhol Hello mate! I think I can help you. I am writing tutorials for trails.js here . I will be posting about models, controllers, policies etc and working processes with basic CRUD examples (table joins and 1:1, 1:n associations), in the future (will take a few days). Details about other trailpack packages (like trailpack-cron & many more) will also be there. My db framework is SEQUELIZE and web server is HAPI (with Joi validations).

I have created a live project here using trailsjs framework.

anshulbisht06 avatar Apr 07 '17 08:04 anshulbisht06

Hi, Checkout https://github.com/johntom/trails-example-express and https://github.com/johntom/trails-example-aurelia. The backend show how to populate passoort with user and I also have ( I think some crud stuff going on with todo app ) John

johntom avatar Apr 07 '17 16:04 johntom

We also made this video for Trails v1: https://www.youtube.com/watch?v=AbSp8jqFDAY&t=4s. Everything there should be compatible with v2, and v3 (upcoming release).

tjwebb avatar Apr 12 '17 17:04 tjwebb

@anshulbisht06 Which server did you use to host this ? Currently looking around for a server to host my Trails / Sails application.

AnthoniG avatar Apr 26 '17 10:04 AnthoniG

@AnthoniG Well Nginx is the server. It is hosted on an AWS VPC environment with ubuntu as the OS. PM2 is used to keep the server process running. You can also host in a AWS EC2 instance.

anshulbisht06 avatar Apr 26 '17 10:04 anshulbisht06

@anshulbisht06 I thought AWS was expensive to run ?

AnthoniG avatar Apr 26 '17 11:04 AnthoniG

@AnthoniG just signup to AWS and choose the free tier instance (ubuntu as OS). It is free for 1 year. And there are many tutorials available that can help you get your web application hosted.

anshulbisht06 avatar Apr 26 '17 11:04 anshulbisht06