@@ -5,7 +5,7 @@ import os { join_path }
55fn (mut c Create) set_web_project_files () {
66 base := if c.new_dir { c.name } else { '' }
77 c.files << ProjectFiles{
8- path: join_path (base, 'src' , ' databases' , 'config_databases_sqlite.v' )
8+ path: join_path (base, 'databases' , 'config_databases_sqlite.v' )
99 content: "module databases
1010
1111import db.sqlite // can change to 'db.mysql', 'db.pg'
@@ -17,14 +17,14 @@ pub fn create_db_connection() !sqlite.DB {
1717"
1818 }
1919 c.files << ProjectFiles{
20- path: join_path (base, 'src' , ' templates' , 'header_component.html' )
20+ path: join_path (base, 'templates' , 'header_component.html' )
2121 content: "<nav>
2222 <div class='nav-wrapper'>
2323 <a href='javascript:window.history.back();' class='left'>
2424 <i class='material-icons'>arrow_back_ios_new</i>
2525 </a>
2626 <a href='/'>
27- <img src='src/ assets/veasel.png' alt='logo' style='max-height: 100%' />
27+ <img src='assets/veasel.png' alt='logo' style='max-height: 100%' />
2828 </a>
2929 <ul id='nav-mobile' class='right'>
3030 <li><a href='https://github.com/vlang/v'>github</a></li>
@@ -36,7 +36,7 @@ pub fn create_db_connection() !sqlite.DB {
3636"
3737 }
3838 c.files << ProjectFiles{
39- path: join_path (base, 'src' , ' templates' , 'products.css' )
39+ path: join_path (base, 'templates' , 'products.css' )
4040 content: 'h1.title {
4141 font-family: Arial, Helvetica, sans-serif;
4242 color: #3b7bbf;
@@ -50,7 +50,7 @@ div.products-table {
5050}'
5151 }
5252 c.files << ProjectFiles{
53- path: join_path (base, 'src' , ' templates' , 'products.html' )
53+ path: join_path (base, 'templates' , 'products.html' )
5454 content: "<!DOCTYPE html>
5555<html>
5656<head>
@@ -67,7 +67,7 @@ div.products-table {
6767 <link href='https://fonts.googleapis.com/icon?family=Material+Icons' rel='stylesheet'>
6868
6969 <title>Login</title>
70- @css 'src/ templates/products.css'
70+ @css 'templates/products.css'
7171</head>
7272<body>
7373 <div>@include 'header_component.html'</div>
@@ -147,7 +147,7 @@ div.products-table {
147147</html>"
148148 }
149149 c.files << ProjectFiles{
150- path: join_path (base, 'src' , ' auth_controllers.v' )
150+ path: join_path (base, 'auth_controllers.v' )
151151 content: "module main
152152
153153import vweb
@@ -164,7 +164,7 @@ pub fn (mut app App) controller_auth(username string, password string) vweb.Resu
164164"
165165 }
166166 c.files << ProjectFiles{
167- path: join_path (base, 'src' , ' auth_dto.v' )
167+ path: join_path (base, 'auth_dto.v' )
168168 content: 'module main
169169
170170struct AuthRequestDto {
@@ -174,7 +174,7 @@ struct AuthRequestDto {
174174'
175175 }
176176 c.files << ProjectFiles{
177- path: join_path (base, 'src' , ' auth_services.v' )
177+ path: join_path (base, 'auth_services.v' )
178178 content: "module main
179179
180180import crypto.hmac
@@ -269,7 +269,7 @@ fn auth_verify(token string) bool {
269269"
270270 }
271271 c.files << ProjectFiles{
272- path: join_path (base, 'src' , ' index.html' )
272+ path: join_path (base, 'index.html' )
273273 content: "<!DOCTYPE html>
274274<html>
275275<head>
@@ -348,7 +348,7 @@ fn auth_verify(token string) bool {
348348"
349349 }
350350 c.files << ProjectFiles{
351- path: join_path (base, 'src' , ' main.v' )
351+ path: join_path (base, 'main.v' )
352352 content: "module main
353353
354354import vweb
@@ -376,7 +376,7 @@ fn main() {
376376 db.close() or { panic(err) }
377377
378378 mut app := &App{}
379- app.serve_static('/favicon.ico', 'src/ assets/favicon.ico')
379+ app.serve_static('/favicon.ico', 'assets/favicon.ico')
380380 // makes all static files available.
381381 app.mount_static_folder_at(os.resource_abs_path('.'), '/')
382382
@@ -391,7 +391,7 @@ pub fn (mut app App) index() vweb.Result {
391391"
392392 }
393393 c.files << ProjectFiles{
394- path: join_path (base, 'src' , ' product_controller.v' )
394+ path: join_path (base, 'product_controller.v' )
395395 content: "module main
396396
397397import vweb
@@ -457,7 +457,7 @@ pub fn (mut app App) controller_create_product(product_name string) vweb.Result
457457"
458458 }
459459 c.files << ProjectFiles{
460- path: join_path (base, 'src' , ' product_entities.v' )
460+ path: join_path (base, 'product_entities.v' )
461461 content: "module main
462462
463463@[table: 'products']
@@ -470,7 +470,7 @@ struct Product {
470470"
471471 }
472472 c.files << ProjectFiles{
473- path: join_path (base, 'src' , ' product_service.v' )
473+ path: join_path (base, 'product_service.v' )
474474 content: "module main
475475
476476import databases
@@ -517,7 +517,7 @@ fn (mut app App) service_get_all_products_from(user_id int) ![]Product {
517517"
518518 }
519519 c.files << ProjectFiles{
520- path: join_path (base, 'src' , ' product_view_api.v' )
520+ path: join_path (base, 'product_view_api.v' )
521521 content: "module main
522522
523523import json
@@ -556,7 +556,7 @@ pub fn get_product(token string) ![]User {
556556"
557557 }
558558 c.files << ProjectFiles{
559- path: join_path (base, 'src' , ' product_view.v' )
559+ path: join_path (base, 'product_view.v' )
560560 content: "module main
561561
562562import vweb
@@ -578,7 +578,7 @@ pub fn (mut app App) products() !vweb.Result {
578578"
579579 }
580580 c.files << ProjectFiles{
581- path: join_path (base, 'src' , ' user_controllers.v' )
581+ path: join_path (base, 'user_controllers.v' )
582582 content: "module main
583583
584584import vweb
@@ -648,7 +648,7 @@ pub fn (mut app App) controller_create_user(username string, password string) vw
648648"
649649 }
650650 c.files << ProjectFiles{
651- path: join_path (base, 'src' , ' user_entities.v' )
651+ path: join_path (base, 'user_entities.v' )
652652 content: "module main
653653
654654@[table: 'users']
663663"
664664 }
665665 c.files << ProjectFiles{
666- path: join_path (base, 'src' , ' user_services.v' )
666+ path: join_path (base, 'user_services.v' )
667667 content: "module main
668668
669669import crypto.bcrypt
@@ -732,7 +732,7 @@ fn (mut app App) service_get_user(id int) !User {
732732"
733733 }
734734 c.files << ProjectFiles{
735- path: join_path (base, 'src' , ' user_view_api.v' )
735+ path: join_path (base, 'user_view_api.v' )
736736 content: "module main
737737
738738import json
0 commit comments